Official CLI · v0.2.1

Envly CLI documentation

Access projects and encrypted environment variables without leaving your terminal. Install it once, authenticate, and use the same Envly workspace your team already shares.

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.

Install
$ npm install --global @envly/cli
$ envly --version
0.2.1

$ envly --help
Usage: envly [options] [command]

Update

npm install --global @envly/cli@latest

Uninstall

npm uninstall --global @envly/cli

Available commands

envly login

Authenticate with your Envly account.

envly logout

Remove the locally stored credentials.

envly whoami

Print the authenticated account email.

envly projects

List every project you can access.

envly environments

List the environments in a project.

envly variables

Print decrypted variables by environment.

envly export

Create 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.

Log in
$ envly login
Opening 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

Terminal
$ envly whoami
developer@acme.dev

Sign out

Terminal
$ envly logout
Logged 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.

Terminal
$ envly projects
cm91k2abc0001x7h4p8q2m5v9  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.

Terminal
$ envly environments --project cm91k2abc0001x7h4p8q2m5v9
cm91m1dev0001j8h4r6w3c9y2  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.

Terminal
$ envly variables --project cm91k2abc0001x7h4p8q2m5v9
DEVELOPMENT
  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.

Terminal
$ envly export --project cm91k2abc0001x7h4p8q2m5v9
Environment variables exported to /Users/marco/projects/acme/envly-cm91k2abc0001x7h4p8q2m5v9.zip
OptionDescription
-p, --project <id>Required project ID.
-o, --output <path>Custom file path. A .zip extension is added if omitted.
-f, --forceOverwrite the archive if it already exists.
Custom output
$ envly export -p cm91k2abc0001x7h4p8q2m5v9 -o secrets/envly-variables.zip --force
Environment 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.