CLI Overview
The EnvManager CLI (@envmanager-cli/cli) lets you manage environment variables directly from your terminal. Pull variables to local .env files, push changes back to EnvManager, and sync changes in real-time during development.
Installation
Homebrew (macOS/Linux)
brew install shintaii/tap/envmanager
To upgrade to the latest version:
brew upgrade envmanager
npm
npm install -g @envmanager-cli/cli
Or use npx without installing:
npx @envmanager-cli/cli --help
Quick Start
# 1. Authenticate
envmanager login
# 2. Initialize your project
envmanager init --project <project-id>
# 3. Pull variables to .env
envmanager pull
# 4. Start real-time sync
envmanager dev
Available Commands
| Command | Description |
|---|---|
login | Authenticate with EnvManager |
logout | Clear stored credentials |
whoami | Show current user and organizations |
init | Initialize project and generate template |
pull | Download variables to local .env file |
push | Upload local .env to EnvManager |
diff | Compare local and remote variables |
list | List projects, environments, or variables |
dev | Start real-time sync daemon |
validate | Validate .env against schema |
template | Manage environment templates |
config | Manage project configuration |
debug | Collect diagnostic info for troubleshooting |
Authentication
The CLI supports two authentication methods:
Browser Login (Interactive)
For local development, authenticate via your browser:
envmanager login
This opens your browser, completes OAuth, and stores credentials securely in ~/.config/envmanager/auth.json.
API Keys (CI/CD)
For CI/CD pipelines, use an API key:
export ENVMANAGER_API_KEY=em_xxxxx
envmanager pull
Create API keys from the EnvManager web dashboard under Settings > API Keys.
Configuration
The CLI looks for envmanager.json in your project directory:
{
"project_id": "your-project-uuid",
"environment": "development",
"output": ".env",
"format": "dotenv",
"k8s_namespace": "default",
"k8s_name": "app-secrets"
}
Only project_id and environment are required. The format, k8s_namespace, and k8s_name fields are optional and default to the values shown above. See Export Formats for details.
Generate this automatically with:
envmanager init --project <project-id>
Next Steps
- Authentication - Detailed auth setup
- Core Commands - pull, push, diff, list
- Real-time Sync - Development workflow
- Templates - Environment templates
- Validation - Schema validation
- Export Formats - Docker Compose, Kubernetes, Vercel, and more