This guide walks you through installing the dotEnv CLI, authenticating against dotEnv Cloud, and confirming that your organization is connected. The CLI is a single, statically linked Go binary, so there is nothing to compile and no runtime to install.
Install the CLI
There are two release channels: stable (tagged releases) and nightly (the rolling build of main). Pick the install method that matches your platform.
Verify the binary is on your PATH:
Initialize your configuration
Run dotenv init to create a local configuration file and set up your first account. The command is interactive and walks you through authentication, organization selection, and telemetry preferences.
Authenticate
For local development, dotenv login uses OAuth2 by default. It opens your browser, grants access to every organization you belong to, and supports automatic token refresh.
For automation and CI/CD, authenticate with an organization API key instead. API-key authentication is scoped to a single organization and never opens a browser:
Configure with environment variables
Every setting can be supplied through an environment variable, which is the preferred approach for non-interactive environments. The variables the CLI reads are:
| Variable | Purpose |
|---|---|
| DOTENV_API_KEY | Organization API key used for authentication. |
| DOTENV_API_URL | Override the API base URL. |
| DOTENV_ORGANIZATION | Force a specific organization slug. |
| DOTENV_CONTEXT | Select a saved context. |
| DOTENV_CLIENT_KEY | Client-managed encryption key value. |
| DOTENV_DEBUG | Enable verbose debug output. |
Confirm the connection
Finally, check that the CLI can talk to dotEnv Cloud and that your organization context is correct:
If dotenv status shows your account and organization, you are ready to go. Continue with Creating Your First Project to set up your hierarchy and push your first secrets.