dither env
Manage the dither global env store at <dither-home>/env.json.
dither env manages dither's own env namespace at <dither-home>/env.json (default ~/.dither/env.json; relocated by $DITHER_DIR or $XDG_CONFIG_HOME/dither — see Storage). It's a dither-managed key/value store, not a wrapper around shell environment variables. Plugins granted --allow-env KEY read these values (looked up by name at every run). Rotate a value once; every plugin granted that name picks up the new value next run.
Has nothing to do with
process.envor shell exports. The store is a plain JSON file on disk owned by dither.
See also: dither plugin, Security.
set
dither env set <name> <value>Set or replace a value. Both arguments are required.
$ dither env set OPENAI_API_KEY sk-proj-abc123
set OPENAI_API_KEYget
dither env get <name>Print the value to stdout. Exits 1 with no such env: <name> on stderr if the name is not set.
$ dither env get OPENAI_API_KEY
sk-proj-abc123
$ dither env get MISSING
no such env: MISSING
$ echo $?
1unset
dither env unset <name>Remove a value. Exits 1 with no such env: <name> on stderr if the name was not set (idempotent removes need a manual check).
$ dither env unset OPENAI_API_KEY
unset OPENAI_API_KEYlist
dither env listPrint every name in the store, one per line, sorted. Values are not printed — if you need to inspect a value, use get. Prints (no global env set) when the store is empty.
$ dither env list
ANTHROPIC_API_KEY
OPENAI_API_KEYHonest caveat
Values are stored plaintext in <dither-home>/env.json, scoped by Unix permissions. The architecture commits to OS keychain integration (macOS Keychain, libsecret on Linux); v0 has none. Anything that can read your home dir can read your env values. Treat the store the way you'd treat a .env file on disk.