Overview

SDKs

Official Envless SDKs for TypeScript, Python, Ruby and PHP. Typed clients for the whole Envless API, with the same methods in every language.

Envless publishes an official SDK for TypeScript, Python, Ruby and PHP. Each one is a typed client for the Envless API that administers a workspace from code: products, projects, environments, variables, versions, members, roles, keys and webhooks. The four are twins. Every one has all 113 methods across 13 namespaces, sends the same requests on the wire, retries the same way and raises the same error codes, so what you learn in one carries over to the others.

Install

npm install @goenvless/sdk

Every SDK authenticates with a personal access key (ev_sk_...), and each key is scoped to one workspace. Generate one at envless.cloud/dashboard/keys and give it to the client through ENVLESS_TOKEN. See Keys for naming, rotation and revocation, and Authentication for what a key grants.

The same client in every language

The clients mirror each other call for call. TypeScript and PHP use the same method names, and Python and Ruby use those names in snake_case.

import { createClient } from '@goenvless/sdk'

const envless = createClient({ token: process.env.ENVLESS_TOKEN })

const workspace = await envless.workspace.get()

for await (const project of envless.projects.iterate()) {
    console.log(project.slug)
}

How they compare

TypeScriptPythonRubyPHP
Package@goenvless/sdkenvless-sdkenvless-sdkenvless/sdk
RegistrynpmPyPIRubyGemsPackagist
RequiresNode.js 20+, Bun, Deno, WorkersPython 3.10+Ruby 3.2+PHP 8.2+
Imported as@goenvless/sdkenvlessenvless/sdkEnvless\Envless
Method nameslistAlllist_alllist_alllistAll
TypesBundled declarationsmypy and pyrightRBSPHPStan and Psalm
DependenciesNonehttpx, anyio, cryptography, typing-extensionsNone at runtimeNone

What every SDK shares

A key is bound to one workspace

The workspace comes from the key, never from the request. Reaching a second workspace means a second client.

Values are ciphertext, always

The server never sees plaintext and cannot encrypt for you, so every SDK ships the same encryption helpers. Encrypt before writing, decrypt after reading. See Encryption.

Lists come in three flavours

list for one page, listAll for everything, iterate for a stream, with list_all in Python and Ruby.

Errors carry the API code

Every API failure surfaces the API's stable machine-readable code, the same codes listed in Errors.

Coverage is enforced

The TypeScript SDK checks itself against openapi.json on every build, and the Python, Ruby and PHP SDKs replay every method against the requests the TypeScript SDK sends. A missing method, or one that drifts, fails the check.

An SDK administers a workspace. It is not how an app loads its own variables at boot: that is Env, with runtimes for Python, Ruby and PHP as well. CLI, runtime and SDK compares the three packages, and any other language can call the HTTP API directly.