Core Commands
These commands handle the basic workflow of syncing environment variables between EnvManager and your local .env files.
pull
Download variables from EnvManager to a local file.
envmanager pull [options]
Options:
| Option | Description |
|---|---|
-e, --environment <name> | Environment name (default: from config or "development") |
-p, --project <id> | Project ID (default: from config) |
-o, --output <file> | Output file path (default: .env) |
--format <type> | Export format (see Export Formats) |
--k8s-namespace <ns> | Kubernetes namespace (default: "default") |
--k8s-name <name> | Kubernetes resource name |
--no-secrets | Exclude secret values (will be empty) |
-f, --force | Overwrite existing file without prompting |
-r, --resolve-references | Resolve ${VAR} references to their values |
-F, --include-fallbacks | Include fallback values for empty variables |
-s, --show-sources | Show value source as inline comments |
--service <name> | Pull one service's variables plus the shared ones (default: service from config, if set) |
--tag <tags...> | Only variables with one of these tags (untagged variables are always included) |
Services and duplicate keys: a file holds one value per key. With --service, the service's own value wins over a shared variable with the same key. Without --service, a key that exists in several services is written once. If those values differ, the CLI writes the shared value (or the first service's) and prints a warning naming the keys; use --service to get each service's own values.
Examples:
# Pull from configured project/environment
envmanager pull
# Pull specific environment
envmanager pull --environment production
# Pull to custom file
envmanager pull --output .env.local
# Pull without secret values
envmanager pull --no-secrets
# Pull as Docker Compose YAML
envmanager pull --format docker-compose -o docker-compose.env.yml
# Pull as Kubernetes Secret
envmanager pull --format k8s-secret --k8s-name my-app --k8s-namespace production -o secrets.yaml
Output:
Pulled 12 variables to .env (dotenv)
8 plain, 4 secrets
For details on all supported export formats, see Export Formats.
push
Upload a local .env file to EnvManager. Existing variables are updated in place, new ones are added; nothing is deleted. The push is all-or-nothing: if anything fails, no variable is changed.
envmanager push [options]
Options:
| Option | Description |
|---|---|
--org <name> | Organization name (only needed if you belong to several) |
-e, --environment <name> | Environment name (default: from config or "development") |
-p, --project <id> | Project ID, friendly ID or name (default: from config) |
-i, --input <file> | Input file path (default: .env) |
--secrets <keys> | Comma-separated keys or patterns to mark as secrets (see below) |
--plain <keys> | Comma-separated keys or patterns to explicitly mark as plain — turns those secrets back into plain variables; other keys keep their flag |
--all-secrets | Mark every variable in the file as a secret |
--no-secrets | Mark every variable in the file as plain |
--service <name> | Push to a specific service instead of the shared variables |
--create | Create the --service if it doesn't exist yet (owners and admins only) |
--dry-run | Show exactly what would happen without changing anything |
--no-sync | Don't trigger auto-sync to connected platforms after the push |
Examples:
# Push from .env
envmanager push
# Preview first — shows target project, environment and service
envmanager push --dry-run
# Mark specific variables as secrets
envmanager push --secrets "DATABASE_URL,API_SECRET"
# Patterns: * matches anything, ? matches one character
envmanager push --secrets "STRIPE_*,*_SECRET,*_TOKEN"
# Push a different file to production
envmanager push --input .env.production --environment production
# Push to a service, creating it on the first run
envmanager push --service worker --create
# Turn PORT and LOG_LEVEL back into plain variables, keep everything else as is
envmanager push --plain "PORT,LOG_LEVEL"
# Both at once: STRIPE_* become secrets, NEXT_PUBLIC_* become plain
envmanager push --secrets "STRIPE_*" --plain "NEXT_PUBLIC_*"
How secrets are decided:
- Keys matching
--secretsbecome secrets. Matching is case-sensitive;*and?are the only wildcards. - Keys matching
--plainbecome plain variables, even if they are secrets today. Same pattern syntax. - Keys that match neither keep whatever they already are on the server. A key that is already a secret stays a secret even when you leave it out of
--secrets. New keys are plain. --secretsand--plaincan be combined, but a key that matches both is an error.--all-secretsmakes everything a secret;--no-secretsmakes everything plain. Neither can be combined with--secretsor--plain.- If an entry in
--secretsor--plainmatches no key in your file, you get a warning (not an error) so a typo doesn't go unnoticed.
Auto-sync:
After a successful push the CLI triggers auto-sync for every integration of the environment that has Auto-sync enabled (Vercel, Render, Railway, GitHub, ...), exactly like saving in the web app does. Only sync targets whose scope includes what you pushed are triggered: a push to the shared variables reaches every target, a push with --service api reaches "whole environment" targets and the api target. The outcome is printed under the summary:
✔ Pushed 12 variables to production
3 inserted, 9 updated
Auto-sync: render ✔
Auto-sync: vercel ✖ Vercel token expired — reconnect the integration
A failed auto-sync does not fail the push (the variables are saved); open the integration page for details. Pass --no-sync to skip auto-sync, for example when you push several files in a row and want to sync once at the end. Nothing is printed when the environment has no auto-sync targets.
Changing whether a variable is secret:
Once a key is a secret it stays one until you say otherwise. To un-mark a few keys after an earlier --all-secrets push, use push --plain "KEY_A,KEY_B", or set a single key directly with envmanager set KEY=VALUE --no-secret (see set). The other direction works the same way: push --secrets or set KEY=VALUE --secret.
Empty values:
A secret can't be empty. If any key that would end up as a secret has an empty value, the push stops before anything is written and lists every offending key:
✖ Push aborted: 2 secrets have an empty value
STRIPE_KEY
DB_PASSWORD
Plain variables may be empty.
Dry run output:
✔ Dry run — no changes made
Project: acme-api
Environment: production
Service: worker (will be created)
Variables: 12 (3 new, 9 updated)
Secrets: STRIPE_KEY, DB_PASSWORD
Un-marked: PORT
Variables to push:
PORT=3000
STRIPE_KEY=•••••• [secret] [new]
A dry run performs every check the real push does (authentication, project/environment/service lookup, naming conventions, empty secrets), so a successful dry run means the push will succeed. The Un-marked line only appears when --plain is given and lists the keys that are secrets today and will become plain.
set
Set one or more variables directly from the command line, without a .env file. Existing keys are updated, new ones are created; nothing else in the environment is touched. Like push, the write is all-or-nothing.
envmanager set KEY=VALUE [KEY2=VALUE2 ...] [options]
Options:
| Option | Description |
|---|---|
--org <name> | Organization name (only needed if you belong to several) |
-e, --environment <name> | Environment name (default: from config or "development") |
-p, --project <id> | Project ID, friendly ID or name (default: from config) |
--service <name> | Set the variables on a service instead of the shared variables (default: service from config, if set) |
--secret | Mark the variables as secrets |
--no-secret | Mark the variables as plain — turns a secret back into a plain variable |
--no-sync | Don't trigger auto-sync to connected platforms after saving |
Without --secret or --no-secret each key keeps the flag it already has on the server; new keys are plain. Like push, a successful set triggers auto-sync for integrations with Auto-sync enabled and prints the outcome.
Examples:
# Set a plain variable in the configured environment
envmanager set LOG_LEVEL=debug
# Set a secret in production
envmanager set STRIPE_KEY=sk_live_... --environment production --secret
# Several at once; the value may contain = and can be quoted
envmanager set API_URL="https://api.example.com" DEBUG=true
# Turn an existing secret back into a plain variable
envmanager set PORT=3000 --no-secret
# Set on a service
envmanager set WORKER_CONCURRENCY=4 --service worker
Output:
✔ Set STRIPE_KEY in production [secret]
0 inserted, 1 updated
Values are split on the first =, so DATABASE_URL=postgres://u:p@host/db?sslmode=require works as expected. Matching surrounding quotes are removed. A secret can't have an empty value; a plain variable can. Naming conventions are checked exactly as in push.
service
Manage services — named subdivisions of a project such as api or worker that keep their own set of variables per environment.
service create
envmanager service create <name> [options]
Options:
| Option | Description |
|---|---|
--org <name> | Organization name (only needed if you belong to several) |
-p, --project <id> | Project ID, friendly ID or name (default: from config) |
-d, --description <text> | Optional description |
The command is safe to run repeatedly: if the service already exists (names are matched case-insensitively) it reports that and exits successfully, so it can run unconditionally in CI. Only organization owners and admins can create services.
envmanager service create worker --description "Background jobs"
envmanager push --service worker
diff
Compare a local .env file with the variables stored in EnvManager. It only reports; it never changes anything.
envmanager diff [options]
Options:
| Option | Description |
|---|---|
--org <name> | Organization name (only needed if you belong to several) |
-e, --environment <name> | Environment name (default: from config or "development") |
-p, --project <id> | Project ID, friendly ID or name (default: from config) |
-i, --input <file> | Local file to compare (default: .env) |
--service <name> | Compare against a service: its variables plus the shared ones (default: service from config, or the whole environment) |
--keys-only | Only show key names, not values |
--tag <tags...> | Only compare variables with these tags (untagged variables are always included) |
Output:
+ 1 to add (local only):
+ NEW_VAR=value
- 2 remote only (not touched by push):
- OLD_VAR
- LEGACY_TOKEN [secret]
push never deletes: these stay on the server until you remove them in the web app.
~ 1 modified:
~ API_URL
8 unchanged
How to read it:
- to add (local only) — keys in your file that don't exist remotely.
pushwill create them. - remote only (not touched by push) — keys that exist remotely but not in your file.
pushleaves them alone; it never deletes. Remove them in the web app if they are obsolete, orpullto get them locally. - modified — the value differs.
pushwill overwrite the remote value with yours;pulldoes the opposite.
Secret values are never shown in diff output.
Services: a key can exist once as a shared variable and once per service. Without --service, diff compares every row and tags ambiguous keys with their scope, e.g. ~ DATABASE_URL (service: api), and prints a note suggesting --service. With --service api, the comparison covers exactly what pull --service api and run --service api receive: the service's own variables plus the shared ones.
list
List projects, environments, or variables.
envmanager list <type> [options]
Types:
| Type | Description |
|---|---|
projects | List all accessible projects |
environments | List environments in a project |
variables | List variables in an environment |
Options:
| Option | Description |
|---|---|
--org <name> | Organization name (only needed if you belong to several) |
-p, --project <id> | Project ID (for environments/variables) |
-e, --environment <name> | Environment name (default: "development") |
--service <name> | Only list that service's variables (default: service from config, or every scope) |
-v, --verbose | Show IDs (and creation dates for variables) |
Examples:
# List all projects
envmanager list projects
# List environments in a project
envmanager list environments --project abc123
# List variables (uses config if no project specified)
envmanager list variables
# Only the variables of one service
envmanager list variables --service api
# Verbose output with IDs
envmanager list projects --verbose
envmanager list variables --verbose
Output:
✔ Found 3 projects
#1 my-app (Acme)
#2 backend-api (Acme)
#3 marketing-site (Acme)
✔ Found 5 variables (2 secrets)
API_KEY [secret] (shared)
DATABASE_URL [secret] (service: api)
DATABASE_URL [secret] (service: worker)
DEBUG (shared)
PORT (service: api)
Values are never listed; use pull for that. Each variable shows its scope: (shared) for variables every service receives, or (service: name). A key can appear more than once when it is defined per service. With --service, only that service's own rows are shown — shared variables are visible without the flag.
integrations list
Show which platforms a project syncs to and where each environment's variables go: every connected platform (Render, Vercel, Railway, Coolify, Dokploy, AWS, Google Cloud, Azure) that is enabled for the project, its sync options, and per environment its sync targets. The command only reads. To change Render sync targets from a file, use integrations apply; everything else is changed on the project's Integrations page in the web app.
Use it to check your integration setup against what you keep in code, for example on every release in CI: save the JSON output and compare it with what you expect.
envmanager integrations list [options]
Options:
| Option | Description |
|---|---|
--org <name> | Organization name (only needed if you belong to several) |
-p, --project <id> | Project ID, friendly ID or name (default: from config) |
--platform <id> | Only one platform: aws, azure, coolify, dokploy, gcp, railway, render or vercel |
--json | Print the result as JSON instead of a table |
Examples:
# All integrations of the project in envmanager.json
envmanager integrations list
# Only Render, as JSON, saved to a file
envmanager integrations list --project acme --platform render --json > integrations.json
Table output:
✔ 2 integrations enabled for acme
render · Render production · workspace Acme Production (tea-d1acmeprod)
auto-sync on · secrets on · variables on
ENVIRONMENT SCOPE TARGET TYPE PREFIX REDEPLOY ENABLED
production Shared variables only production-shared env_group APP_ no no
production service: api production-api service - yes yes
production service: worker production-worker service - no yes
staging Whole environment staging-api service - yes yes
render · Render staging · workspace Acme Staging (tea-d1acmestg)
auto-sync off · secrets off · variables on
No sync targets configured.
Each block is one connection. The second line shows the project's sync options for it. Each row is one sync target:
- Scope — what the target receives: Whole environment (every variable), Shared variables only (variables without a service), or service: name (that service's variables plus the shared ones). See Sync Targets and Services.
- Target and Type — the resource on the platform, such as a Render service or environment group. AWS, Google Cloud and Azure show
-: they create one secret per variable, named from the prefix and the key. - Prefix — added in front of every key on the platform.
- Redeploy — whether the platform redeploys (Render) or restarts (Coolify) after a sync;
-when the platform has no such option. - Enabled —
nofor a target that is switched off.
A connection that is enabled for the project but has no targets yet is still shown, with "No sync targets configured." Disconnected platforms are not shown.
JSON output (shortened to one target):
{
"project": { "id": "6f1c...", "name": "acme" },
"integrations": [
{
"platform": "render",
"connection": {
"id": "0b7e...",
"name": "Render production",
"workspace": { "id": "tea-d1acmeprod", "name": "Acme Production" }
},
"options": { "auto_sync": true, "sync_secrets": true, "sync_variables": true },
"environments": [
{
"id": "9a42...",
"name": "production",
"targets": [
{
"id": "c3d8...",
"scope": "service",
"service": { "id": "51e0...", "name": "api" },
"enabled": true,
"prefix": null,
"target": { "type": "service", "id": "srv-d1api0001", "name": "production-api" },
"redeploy_after_sync": true,
"config": {
"owner_id": "tea-d1acmeprod",
"owner_name": "Acme Production",
"redeploy_after_sync": true,
"target_id": "srv-d1api0001",
"target_name": "production-api",
"target_type": "service"
}
}
]
}
]
}
],
"inaccessible_environments": []
}
The order is always the same (platform, connection name, environment name, then scope, service and target name), so two runs with the same setup give identical output. workspace is only filled in for Render. config holds the platform-specific settings as stored. No tokens or other credentials are ever included.
Environment access: you only see sync targets in environments you have access to, even as an owner or admin. Environments you can't access are named in a warning and listed in inaccessible_environments:
⚠ No access to environment "production": sync targets there are not visible to you. An owner or admin can grant environment access in the web app.
When you run the check in CI with an API key, make sure the key's user has access to every environment you check, and treat a non-empty inaccessible_environments as a failure. Otherwise a missing access right looks the same as "no sync targets".
GitHub sync is not included yet; check it on the project's Integrations page.
integrations apply
Set a project's Render sync targets from a file, instead of clicking through the Configure dialog. Use it when you keep your environments in code, for example next to a Render blueprint, and want your tooling to create and change sync targets.
The file has the same shape as the output of integrations list --json. The easiest start is to save the current setup and edit it. Running apply on a file you just saved reports "No changes".
envmanager integrations apply -f <file> [options]
Options:
| Option | Description |
|---|---|
-f, --file <path> | The file with the desired sync targets: JSON, or YAML when the name ends in .yaml or .yml. - reads from standard input |
--org <name> | Organization name (only needed if you belong to several) |
-p, --project <id> | Project ID, friendly ID or name (default: the project in the file, then your config) |
--dry-run | Show what would change and write nothing |
--exit-code | Exit with code 2 when there are differences, for drift checks in CI |
--prune | Also remove sync targets that are not in the file (see below) |
-y, --yes | Apply without asking for confirmation |
--json | Print the plan and the result as JSON |
Before you start:
- You need the owner or admin role, and access to every environment in the file. An API key acts as the user who created it.
- The Render connection must already exist in your organization (Settings → Integrations). If it is not enabled for the project yet,
applyenables it. - The env groups and services must already exist in Render.
applynever creates env groups, never creates or changes connections, and never starts a sync.
Worked example
Your project acme syncs staging to the Render env group staging-shared. You want production to sync to the env group production-shared in a second Render workspace, "Acme Production", with auto-sync on.
1. Write the file. You can use names instead of ids. Save it as envmanager-targets.yaml:
project: acme
integrations:
- platform: render
connection: Render staging
environments:
- name: staging
targets:
- scope: shared
target: { type: env_group, name: staging-shared }
- platform: render
connection: { workspace: Acme Production }
options: { auto_sync: true }
environments:
- name: production
targets:
- scope: shared
target: { type: env_group, name: production-shared }
2. Check the plan with --dry-run. Nothing is written:
envmanager integrations apply -f envmanager-targets.yaml --dry-run
Plan (dry run) for acme
render · Render staging · workspace Acme Staging
options unchanged: auto-sync off · secrets on · variables on
ENVIRONMENT SCOPE TARGET TYPE PREFIX REDEPLOY ENABLED
= unchanged staging Shared variables only staging-shared env_group - no yes
render · Render production · workspace Acme Production
+ enable for project acme: auto-sync on · secrets on · variables on
ENVIRONMENT SCOPE TARGET TYPE PREFIX REDEPLOY ENABLED
+ add production Shared variables only production-shared env_group - no yes
Plan: 1 to add, 0 to change, 0 to remove, 1 unchanged, 1 connection to enable.
Dry run: nothing was written.
3. Apply it. The CLI shows the same plan and asks Apply these changes to acme?. Answer y:
envmanager integrations apply -f envmanager-targets.yaml
✔ render · Render staging: applied
✔ render · Render production: applied
Apply does not trigger a sync. The targets are used from the next sync: Sync Now on the project's Integrations page, or the next auto-sync.
The Integrations page now shows both connections with their targets, exactly as if you had saved them in the Configure dialog. Click Sync Now to send the variables.
What the file means
Each target in the file is the full desired setup of one sync target:
| Field | Meaning | When left out |
|---|---|---|
scope | environment (every variable), shared (variables without a service) or service | service when a service is given; otherwise Whole environment for a project without services and Shared variables only for a project with services, like the Configure dialog |
service | The service, by name or id. Only with scope: service | none |
target | The Render resource: { id }, or { type, name } with type service or env_group | required |
prefix | Added in front of every key | no prefix |
redeploy_after_sync | Redeploy on Render after each sync | false |
enabled | Switch the target off without removing it | true |
Because a left-out field means "the default", leaving prefix out of an existing target removes its prefix. options (auto_sync, sync_secrets, sync_variables) is different: leave it out and the connection's options stay as they are.
The fields id and config that integrations list --json prints are ignored. A connection can be named by id, by name, or by its Render workspace; an environment by name or id. When a name matches two Render resources, the CLI asks you to use the id.
How targets are matched. A target in the file updates the existing target with the same environment, connection, scope and service. If there is none, but one existing target in that environment sends to the same Render resource, that target is updated: you changed its scope or service. The plan then tells you how many keys that were synced before would be removed from Render on the next sync.
Removing targets. Without --prune, apply never deletes anything. Existing targets that are not in the file are shown as kept (not in file). With --prune, those targets are removed, but only in the environments the file lists for that connection. To remove all targets of one environment, list it with targets: [] and use --prune. Environments and connections that are not in the file are never touched.
Checks first. Before writing anything, the CLI checks the whole file: project, connections, environments, your access, services and Render resources. If something is wrong, it lists every problem at once and writes nothing:
✖ 2 problems, nothing was written:
- integrations[0].environments[0].targets[0].target: Render env group "staging-shard" not found in workspace "Acme Staging" (the CLI never creates env groups: create it in Render or in the web app first)
- integrations[1].environments[0]: environment "prod" not found in project "acme" (has: development, production, staging)
Other platforms. This version writes Render targets only. You may keep other platforms in the file (so a full integrations list --json file works), but only unchanged. Changing them gives a "not supported yet" error. GitHub is not supported.
In CI
# Fail the build when the setup in EnvManager differs from the file
envmanager integrations apply -f envmanager-targets.yaml --dry-run --exit-code
# Apply on deploy; --yes is required when there is no terminal to confirm in
envmanager integrations apply -f envmanager-targets.yaml --yes
| Exit code | Meaning |
|---|---|
| 0 | No changes, or applied |
| 1 | A problem in the file, no permission, cancelled, or a write failed |
| 2 | With --exit-code: there are differences (dry run) or changes were applied |
If a write fails halfway, the output names which connections were applied, which failed and which were not attempted. Running the same file again is safe: it only applies what is still different.
config
Manage project configuration.
envmanager config <action> [options]
Actions:
| Action | Description |
|---|---|
init | Create envmanager.json interactively |
get <key> | Get a config value |
set <key> <value> | Set a config value |
Examples:
# Initialize configuration
envmanager config init
# Get current project
envmanager config get project_id
# Change environment
envmanager config set environment staging
debug
Collect diagnostic info for troubleshooting. Share the output with support when reporting issues.
envmanager debug
Output:
=== EnvManager CLI Debug Report ===
Timestamp: 2026-02-19T15:48:27.806Z
CLI Version: 0.1.5
Node: v22.14.0
Platform: darwin arm64
--- Config ---
Config file: /path/to/envmanager.json
project_id: not set
environment: not set
--- Authentication ---
Auth method: CLI session key (em_abc1234...)
API URL: default (production)
--- API Connection ---
Auth exchange: 120ms
getUser: 45ms
User ID: abc-123...
Email: user@example.com
Org query: 32ms
Organizations (1):
- My Org (owner) [abc12345...]
=== End Debug Report ===
API keys are partially redacted. No secrets are exposed.
Common Workflows
Initial Setup
# Login once
envmanager login
# Initialize project
envmanager init --project <id>
# Pull current variables
envmanager pull
Daily Development
# Check what's different
envmanager diff
# Pull latest changes
envmanager pull --force
# Or use real-time sync
envmanager dev
Updating Production
# Compare with production
envmanager diff --environment production
# Push changes (with review)
envmanager push --environment production
# Or dry-run first
envmanager push --environment production --dry-run