Reference
This page documents exact behavior. Open the reference overview
Configuration¶
This page describes the user-level config file used by envctl.
Config controls machine-local tool behavior. It does not define the project contract and it does not replace local stored values.
Location¶
Typical location:
Example¶
{
"vault_dir": "~/.envctl/vault",
"env_filename": ".env.local",
"contract_filename": ".envctl.yaml",
"runtime_mode": "local",
"default_profile": "local",
"encryption": { "enabled": false }
}
Keys¶
vault_dir¶
The local storage location for the vault.
env_filename¶
The filename used for generated env files. In most projects this remains .env.local.
contract_filename¶
Legacy default filename for the project contract. Root discovery now prefers .envctl.yaml and falls back to .envctl.schema.yaml.
runtime_mode¶
The current execution policy. This controls command policy, not which profile values are selected.
default_profile¶
The default active profile when no explicit selection is provided.
Resolution order is:
--profileENVCTL_PROFILEdefault_profilelocal
encryption¶
Optional block controlling vault encryption at rest.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | false |
When true, vault files are stored as Fernet-encrypted blobs |
When encryption is enabled:
envctlloads or generates<vault_dir>/master.key- vault reads and writes pass through the encryption layer transparently
vault editdecrypts to a temporary file and re-encrypts it afterwards
Runtime observability environment variables¶
envctl also supports runtime environment variables for observability and tracing without editing config.json.
| Variable | Allowed values | Default | Description |
|---|---|---|---|
ENVCTL_OBSERVABILITY_TRACE |
boolean (1/0, true/false, yes/no, on/off) |
false |
Enables structured observability events. |
ENVCTL_OBSERVABILITY_PROFILE |
boolean (1/0, true/false, yes/no, on/off) |
false |
Enables profile and phase summaries at the end of the command. |
ENVCTL_OBSERVABILITY_TRACE_FORMAT |
human | jsonl |
jsonl |
Selects trace rendering format. |
ENVCTL_OBSERVABILITY_TRACE_OUTPUT |
stderr | file | both |
stderr |
Selects trace destination. |
ENVCTL_OBSERVABILITY_TRACE_FILE |
file path | auto | File path used when output includes file. |
ENVCTL_OBSERVABILITY_SANITIZATION |
full | masked | count_only |
masked |
Sanitization policy for observable payloads. |
Behavior notes:
ENVCTL_OBSERVABILITY_TRACE_FILEonly matters whenTRACE_OUTPUTincludesfile- when
TRACE_OUTPUT=file|bothand no file path is provided,envctlwrites to.envctl/observability/latest.jsonlor.txt - invalid values fall back to the documented default
Precedence¶
When a CLI flag exists, precedence is:
- CLI flag (
--trace,--trace-format,--trace-output,--trace-file,--profile-observability) ENVCTL_OBSERVABILITY_*environment variable- internal default
Rules¶
Config does not:
- store secrets
- define the project contract
- replace local profile values