donmai reads configuration from environment variables when they are set. Environment variables take precedence over ~/.donmai/config.toml values.
Variables
DONMAI_API_URL
Type: string — URL
The base URL of the donmai API endpoint. Used when the daemon communicates with a remote orchestration layer.
DONMAI_API_URL=https://donmai.dev/api
DONMAI_API_KEY
Type: string — opaque credential
API key for authenticating outbound requests from the donmai CLI to the API endpoint. Keep this secret — do not commit it to source control.
DONMAI_API_KEY=dmk_...
DONMAI_PROJECT_ID
Type: string — UUID or slug
Project identifier used to scope workflow runs and audit events. Set this when you want all CLI invocations in a shell session to target a specific project without passing --project on every command.
DONMAI_PROJECT_ID=my-project-slug
DONMAI_ARCH
Type: string — path
Path to the architecture corpus directory. Used by the donmai arch subcommand.
DONMAI_ARCH=/path/to/architecture
DONMAI_ARCH_PM_DIR
Type: string — path
Override for the architecture project-management directory within the corpus.
DONMAI_ARCH_PM_DIR=/path/to/architecture/pm
DONMAI_FALLBACK_DISABLED
Type: boolean (true / false)
When true, disables the one-release backward-compat fallback from legacy AGENTFACTORY_* and AF_* environment variables. Set this in CI to catch stale references early.
DONMAI_FALLBACK_DISABLED=true
Deprecation: AGENTFACTORY_* and AF_* variables
For one release after the rename cutover, donmai reads AGENTFACTORY_* and AF_* variables as fallbacks when the corresponding DONMAI_* variable is not set. A deprecation warning is printed to stderr. These fallbacks are removed in the release after.
| Legacy variable | Replaced by |
|---|---|
AGENTFACTORY_API_URL | DONMAI_API_URL |
AGENTFACTORY_API_KEY | DONMAI_API_KEY |
AGENTFACTORY_TUI_PROJECT_ID | DONMAI_PROJECT_ID |
AF_ARCH | DONMAI_ARCH |
AF_ARCH_PM_DIR | DONMAI_ARCH_PM_DIR |
Set DONMAI_FALLBACK_DISABLED=true to disable these fallbacks immediately.