Skip to content

Push & Pull

Push encrypts a .env file and uploads the ciphertext.

Terminal window
envsh push .env --project my-api --env production
# ok: Pushed v1 → my-api/production
Terminal window
envsh push .env --project my-api --env production --message "rotate DB password"
# ok: Pushed v2 → my-api/production

Environment names are arbitrary strings. Use whatever your team uses:

Terminal window
envsh push .env --project my-api --env dev
envsh push .env --project my-api --env staging
envsh push .env --project my-api --env production
envsh push .env --project my-api --env preview-pr-42

Environments are created implicitly on first push. No setup needed.

.env files must be under 1 MB. envsh is designed for key-value pairs, not large binary files.

If two team members push at the same time:

Terminal window
envsh push .env --project my-api --env production
# error: CONFLICT: version conflict: base_version mismatch
# hint: pull the latest version first, merge your changes, then push again

Pull the latest, merge your changes, push again.


Pull downloads and decrypts the latest secrets for an environment.

Terminal window
envsh pull production --project my-api
# ok: Pulled v2 from my-api/production → .env

The output file is created with 0600 permissions (owner-read only).

Terminal window
envsh pull production --project my-api --output .env.production
Terminal window
envsh pull production --project my-api --stdout
# DATABASE_URL=postgres://...
# SECRET_KEY=abc123
Terminal window
envsh pull production --project my-api --stdout --format export
# export DATABASE_URL=postgres://...
# export SECRET_KEY=abc123
# Source directly:
source <(envsh pull production --project my-api --stdout --format export)
Terminal window
envsh pull production --project my-api --stdout --format json
# {"DATABASE_URL": "postgres://...", "SECRET_KEY": "abc123"}
Terminal window
envsh pull production --project my-api --key ~/.ssh/id_ed25519_work