@goenvless/sdk
v0.0.2
Published
The official TypeScript SDK for the Envless API. Manage workspaces, products, projects, environments, variables, versions, members, roles, keys and webhooks from code.
Maintainers
Readme
Intro to the Npm Package
This package provides a lightweight, type-safe way to administer an Envless workspace. Zero dependencies, and works with Node, Bun, Deno and Cloudflare Workers out of the box. Server side only: it carries an API key.
Installing
npm i @goenvless/sdk@latestInitializing
import { init } from '@goenvless/sdk'
init({ token: process.env.ENVLESS_TOKEN })Using
import { encryptValue, envless } from '@goenvless/sdk'
const passphrase = process.env.ENVLESS_PASSPHRASE!
const { workspaceId } = await envless.me.get()
const value = await encryptValue('sk_live_51H...', passphrase, workspaceId)
await envless.variables.create('api', 'production', {
name: 'STRIPE_SECRET_KEY',
value
})Values are encrypted on your machine, never by the server, so a plaintext value is rejected. Everything else, all 113 methods across 13 namespaces, pagination, webhooks, key rotation and the full encryption guide, lives in the documentation.
