Advanced CLI configuration
Use directory settings when different workspaces need different Doomer endpoints or credentials, such as production repositories and local test applications on the same development server. Most installations can use the default endpoint and saved account credentials.
This requires a CLI build with .doomer.env support. Check doomer watch --help for directory configuration before using it; older builds do not read this file.
Directory settings for watch
doomer watch /path/to/workspace looks for .doomer.env in the watched directory, then searches its parents. It uses the nearest file only. It does not merge multiple directory files.
Settings are selected in this order:
- Explicit command flags, such as
--api-urland--profile. - Values in the nearest
.doomer.env. - Inherited environment variables for values absent from that file.
- Saved settings and defaults. The default API endpoint is
https://doomer.ai/api.
The same selection happens when an agent hook starts watch. The hook supplies the working directory; watch selects its endpoint and credentials. This is useful when several agent sessions share a server and cannot rely on having different process environments. These settings do not change the endpoint of hosted GitHub reviews.
Supported settings
| Key | Purpose |
|---|---|
DOOMER_API_URL | API endpoint, including /api. Use HTTPS; HTTP is supported for loopback addresses such as localhost. |
DOOMER_CONFIG_DIR | Absolute path to the directory containing saved CLI credentials and settings. |
DOOMER_PROFILE | Credential profile to select within that configuration directory. |
DOOMER_TOKEN | Explicit token override. Leave it empty to clear an inherited token and use the selected service's saved credentials or anonymous identity. |
Store account credentials through the CLI's login flow rather than putting tokens in repository files. Changing an endpoint or credential directory does not grant permission to upload source: the selected service still needs an existing upload approval.
Production and local test directories
For example, on a Linux development server, put this in /home/alex/workspace/.doomer.env:
DOOMER_API_URL=https://doomer.ai/api
DOOMER_CONFIG_DIR=/home/alex/.config/doomer-productionPut this in /home/alex/test-apps/.doomer.env:
DOOMER_API_URL=http://localhost:3000/api
DOOMER_CONFIG_DIR=/home/alex/.config/doomer-testing
DOOMER_TOKEN=Use your actual absolute paths and keep the two credential stores separate. A watch started in /home/alex/test-apps/goblin-dispatch finds the test-app settings even though the file is in a parent directory. A watch started under /home/alex/workspace finds the production settings.
The empty DOOMER_TOKEN= prevents a production token inherited from the agent server from overriding the test credential store. It does not delete credentials or sign you out of the production account.
File format and applying changes
Use one KEY=value assignment per line. Blank lines and full-line # comments are supported. Values may be enclosed in matching single or double quotes; their contents remain literal.
The file is data, not a shell script. Do not use export, $HOME, command substitution, or shell expressions. Doomer does not execute .envrc and does not require direnv. Unknown keys, duplicate assignments, malformed values, and files over 64 KiB cause an error rather than silently selecting another configuration.
Directory settings apply when watch starts. Restart a manual watch or start a new agent prompt after changing them. To inspect installer-backed upload permission for a directory, use:
doomer has-permission /path/to/workspace --jsonThat check does not submit a review or verify that agent hooks are active. See CLI reference for other commands and Troubleshooting for hook activation problems.