muster env
Keep config and encrypted secrets in the repo, per environment.
Synopsis
Terminal
muster env <command> [flags]Subcommands
| Subcommand | Description |
|---|---|
init [--from .env] [--envs a,b] [--recovery] [--yes] | Start using muster env in this repo. |
set KEY[=VALUE]… [--env E] [--secret|--config] [--type T] [--stdin] [-m MSG] | Set values. Without =VALUE: a hidden prompt, or pipe it. |
get KEY [--env E] [--reveal] | Print a value. Secrets show as ‹secret:fp›. |
unset KEY… [--env E] [-m MSG] | Remove keys. |
list [--env E] [--show-values] [--json] | Keys and where each value comes from. |
diff <envA> <envB> [--json] | Compare two envs. Secrets are compared, never printed. |
edit [--env E] | Edit config and secrets in $EDITOR (temp file, wiped after). |
history [KEY] [--env E] [--json] | Who changed what, never values. |
check [--env E] [--strict] [--no-decrypt] [--fail-on-stale] [--json] | CI gate: required keys, types, MAC. |
pull [--env E] [--to .env] [--format dotenv|json] [--force] | Write a gitignored file. |
example [--to FILE] | Generate .env.example from the schema. |
codegen ts|py|go|all [--out PATH] | Typed, zero-dependency readers. |
keygen [--ci NAME --envs a,b] | Create your key, or a CI key. |
recipient list|add|remove|sync | Who can decrypt which env. |
rekey [--env E] | New data key; every value re-encrypted. |
guard install|check | Pre-commit hook that blocks plaintext secrets. |
Flags
Environment
| Flag | Description |
|---|---|
MUSTER_ENV | Which env to use (default: env.default_env in muster.json, else local). |
MUSTER_ENV_KEY | CI key from muster env keygen --ci NAME. |
Examples
Terminal
muster env init --from .env
muster env set STRIPE_KEY # hidden prompt, stored encrypted
muster env set PORT=3000 # plain config
muster env check --env production --strict
muster env keygen --ci github --envs staging,productionExit codes and JSON
list, get, diff, history and check accept --json and run locally, without a token. check exits 1 when the env doesn't pass.