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

CommandDescription
loginAuthenticate with EnvManager
logoutClear stored credentials
whoamiShow current user and organizations
initInitialize project and generate template
pullDownload variables to local .env file
pushUpload local .env to EnvManager
diffCompare local and remote variables
listList projects, environments, or variables
devStart real-time sync daemon
validateValidate .env against schema
templateManage environment templates
configManage project configuration
debugCollect 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

Get DevOps tips in your inbox

Security best practices and product updates. No spam.

No spam. Unsubscribe anytime.