Quick start
The CLI requires Node.js 22 or newer and an active Envly account. Install the package globally so the envly command is available from any directory.
$ npm install --global @envly/cli$ envly --version 0.2.1 $ envly --help Usage: envly [options] [command]
Update
npm install --global @envly/cli@latestUninstall
npm uninstall --global @envly/cliAvailable commands
envly loginAuthenticate with your Envly account.
envly logoutRemove the locally stored credentials.
envly whoamiPrint the authenticated account email.
envly projectsList every project you can access.
envly environmentsList the environments in a project.
envly variablesPrint decrypted variables by environment.
envly exportCreate a ZIP containing three .env files.
Authentication
Run the login command to open Envly in your browser, then continue with your email and password or Google account.
$ envly loginOpening Envly in your browser... Logged in successfully.
The browser returns a short-lived, single-use authorization code. The CLI exchanges it using PKCE, then saves the resulting access token to ~/.envly/config.json and sent as a Bearer token with authenticated requests. Do not share or commit this file.
Check the active account
$ envly whoamideveloper@acme.dev
Sign out
$ envly logoutLogged out successfully.
List projects
Print every project available to the authenticated user. Pagination is handled automatically. Each row contains the project ID followed by its name.
$ envly projectscm91k2abc0001x7h4p8q2m5v9 Acme API cm91k4def0002x7h4n1b6t3z8 Acme Web
Copy a project ID from the first column. The environments, variables, and export commands require it.
List environments
Use a project ID to list its environments. The long and short project options are equivalent.
$ envly environments --project cm91k2abc0001x7h4p8q2m5v9cm91m1dev0001j8h4r6w3c9y2 DEVELOPMENT cm91m2stg0002j8h4v5q7n1x3 STAGING cm91m3prd0003j8h4b2k8s6z1 PRODUCTION
Short form: envly environments -p <project-id>
List variables
Fetch variables from every environment in the project and print them in development, staging, then production order.
This command prints decrypted values. Avoid shared terminals, CI logs, screen recordings, and any other public output.
$ envly variables --project cm91k2abc0001x7h4p8q2m5v9DEVELOPMENT DATABASE_URL=postgresql://localhost/envly LOG_LEVEL=debug STAGING DATABASE_URL=postgresql://staging.example/envly PRODUCTION DATABASE_URL=postgresql://production.example/envly
An environment with no variables is shown as (no variables). Short form: envly variables -p <project-id>.
Export variables
Export all project variables to a ZIP archive. The archive always contains .env.development, .env.staging, and .env.production.
The ZIP contains decrypted secrets and is not password protected. Store it securely and never commit it to version control.
$ envly export --project cm91k2abc0001x7h4p8q2m5v9Environment variables exported to /Users/marco/projects/acme/envly-cm91k2abc0001x7h4p8q2m5v9.zip
| Option | Description |
|---|---|
| -p, --project <id> | Required project ID. |
| -o, --output <path> | Custom file path. A .zip extension is added if omitted. |
| -f, --force | Overwrite the archive if it already exists. |
$ envly export -p cm91k2abc0001x7h4p8q2m5v9 -o secrets/envly-variables.zip --forceEnvironment variables exported to /Users/marco/projects/acme/secrets/envly-variables.zip
Troubleshooting
Failed commands print a clear message to stderr and exit with a non-zero status.
Not logged in
Projects request failed: you are not logged in. Run "envly login" first.Run envly login, then retry the command.
Project not found
Environments request failed: project "project-id" was not found.Run envly projects and verify that you copied an accessible project ID.
Archive already exists
Export failed: /path/to/archive.zip already exists. Use --force to overwrite it.Choose another path with -o or intentionally replace it with --force.
Unable to connect
Projects request failed: unable to connect to Envly.Check your network connection and try the command again.
Still stuck? Open an issue on GitHub.