Introduction

Installation

Install the CLI, Env, or an SDK for TypeScript, Python or Ruby.

Envless ships as three separate npm packages plus two Python ones, two Ruby ones and two PHP ones. @goenvless/cli is the envless binary and nothing else, @goenvless/env is the package your application imports to load its variables, @goenvless/sdk is the API client for administering a workspace from code, envless-sdk, on PyPI and on RubyGems, is the same API client for Python and for Ruby, envless-env, on PyPI and on RubyGems, is the runtime a Python or Ruby app loads its variables with, and envless/sdk and envless/env, on Packagist, are the API client and the runtime for PHP. Apart from the three runtimes, each of which builds on the SDK of its language, none of them depends on the others, so install whichever surfaces fit:

  • CLI (@goenvless/cli): the envless binary, so login / link / sync / run / types and the rest of the workspace commands. Binary only, its single export is ./package.json, so there is nothing to import from it. Every command is documented under CLI.
  • Env (@goenvless/env): nine entrypoints. import { env } from '@goenvless/env/server' and import { env } from '@goenvless/env/client' are the two you read variables through, the bare @goenvless/env root adds load and the crypto helpers to an untyped, unfiltered env for scripts, @goenvless/env/register is the preload, @goenvless/env/next and @goenvless/env/vite are the build adapters, @goenvless/env/eslint is the lint plugin, @goenvless/env/edge is the fetch-only loader whose load(options) returns a plain record, and @goenvless/env/crypto is the encryption recipe on its own: encrypt, decrypt, encryptWithKey, decryptWithKey, workspaceKey, importWorkspaceKey, passphraseStrength and ENCRYPTION_PARAMETERS. /register is the only entry that loads on import. From /server you either preload it or await load() yourself, and /client reads whatever the Next or Vite adapter inlined at build time. /client, /edge and /crypto are the three built free of Node built-ins, so they are the ones that run in a browser, a worker or on an edge runtime. No binary, installing it globally gives you no envless command. Every entrypoint is documented under Env.
  • SDK (@goenvless/sdk): import { createClient } from '@goenvless/sdk' to manage products, projects, environments, variables, versions, members, roles, keys and webhooks from code. It never loads variables into your app and never touches the filesystem. Every method is documented under SDK, and the HTTP surface beneath it under API.
  • Python SDK (envless-sdk, on PyPI): from envless import envless for the same methods in snake_case, with Envless for synchronous code and AsyncEnvless for asyncio and trio. It administers a workspace and never loads variables into your app: a Python service gets those from envless-env, envless run -- python app.py or envless sync. Every method is documented under Python.
  • Python runtime (envless-env, on PyPI): import envless_env.register, then from envless_env.server import env, to load and read variables in a Python app, with the same loader, cache and rules as @goenvless/env and integrations for Django, Flask, FastAPI and pydantic-settings. Every module is documented under Python runtime.
  • Ruby SDK (envless-sdk, on RubyGems): require "envless/sdk", then Envless.variables and the rest for the same methods in snake_case, with RBS signatures and no runtime dependencies. It administers a workspace and never loads variables into your app: a Rails or Rack service gets those from envless-env, envless run -- bin/rails server or envless sync. Every method is documented under Ruby.
  • Ruby runtime (envless-env, on RubyGems): require "envless/env/load", then Envless.env[:DATABASE_URL], to load and read variables in a Ruby app, with the same loader, cache and rules as @goenvless/env, a Railtie for Rails and RBS signatures. Everything is documented under Ruby runtime.
  • PHP SDK (envless/sdk, on Packagist): new Envless\Envless(), then $envless->variables and the rest for the same methods under their TypeScript names, with a PHPStan and Psalm type for every request and response. It administers a workspace and never loads variables into your app: a PHP service gets those from envless/env, envless run or envless sync.
  • PHP runtime (envless/env, on Packagist): Envless\Env\Env::load(), then Env::get('DATABASE_URL'), to load and read variables in a PHP app, with the same loader, cache and rules as @goenvless/env, recipes for Laravel, Symfony and PHP-FPM, and a generator for typed classes. Everything is documented under PHP runtime.

Install the CLI

A global install adds the envless binary to your PATH. Best for login, link, and ad-hoc commands across multiple projects.

npm i -g @goenvless/cli@latest

To pin the CLI per-project instead of globally, add @goenvless/cli as a dev dependency first. The envless binary ships with that package, so until it is installed there is nothing in node_modules/.bin for npx to run:

bash
npm i -D @goenvless/cli
npx envless --help

Install Env

Pin Env to your project so every contributor and your CI run the same version. This is the package you need if you're using the import { env } mode.

npm i @goenvless/env@latest

Install the TypeScript SDK

Only needed when you administer a workspace from code. Skip it if you're just consuming variables.

npm i @goenvless/sdk@latest

Install the Python SDK

Only needed when you administer a workspace from Python. A Python app that just reads its variables needs the Python runtime below, or the CLI, not this.

pip install envless-sdk

It needs Python 3.10 or newer. See Installation in the Python docs for the requirements and a first call.

Install the Python runtime

For a Python app that loads its own variables at boot.

pip install envless-env

It needs Python 3.10 or newer and installs envless-sdk alongside. See the Python runtime for loading at boot and the framework integrations.

Install the Ruby SDK

Only needed when you administer a workspace from Ruby. A Rails app that just reads its variables needs the Ruby runtime or the CLI, not this.

bundle add envless-sdk

It needs Ruby 3.2 or newer and nothing else. See Installation in the Ruby docs for the requirements and a first call.

Install the Ruby runtime

For a Ruby app that loads its own variables at boot.

bundle add envless-env

It needs Ruby 3.2 or newer and installs envless-sdk alongside. See the Ruby runtime for loading at boot and the Rails integration.

Install the PHP SDK

Only needed when you administer a workspace from PHP. A Laravel or Symfony app that just reads its variables needs the PHP runtime or the CLI, not this.

bash
composer require envless/sdk

It needs PHP 8.2 or newer with the curl, json and openssl extensions, which almost every PHP build ships with, and no other Composer package. See the PHP SDK for the client, every method and its examples.

Install the PHP runtime

For a PHP app that loads its own variables at boot.

bash
composer require envless/env

It needs PHP 8.2 or newer and installs envless/sdk alongside. See the PHP runtime for loading at boot and the Laravel and Symfony setups.

Verify

Check whichever packages you installed. Only the CLI ships a command to run.

envless --version

What's next

Going deeper

The full command surface, and what each one does, is laid out on the site.