Environment Variables¶
All bnerd configuration keys can be set via environment variables. The BNERD_ prefix is used, with dashes converted to underscores and all letters uppercased.
Variable Mapping¶
Connection & Authentication¶
| Environment Variable | Config Key | Description |
|---|---|---|
BNERD_API_URL | api-url | CloudAPI base URL |
BNERD_TOKEN | token | Bearer token for authentication |
BNERD_ORG_ID | org-id | Organization ID |
BNERD_PROJECT_ID | project-id | Project ID |
BNERD_REGION | region | Cloud region |
BNERD_CONFIG | config | Config file path |
Output¶
| Environment Variable | Config Key | Description |
|---|---|---|
BNERD_OUTPUT | output | Output format (json, table, yaml) |
BNERD_DEBUG | debug | Enable debug output (true/false) |
AI Features¶
| Environment Variable | Config Key | Description |
|---|---|---|
BNERD_ANTHROPIC_KEY | anthropic-key | Anthropic API key |
BNERD_AI_MODEL | ai-model | AI model selection |
BNERD_AI_MODE | ai-mode | AI safety mode |
BNERD_AI_PROVIDER | ai-provider | AI provider |
BNERD_OPENAI_KEY | openai-key | OpenAI-compatible API key |
BNERD_OPENAI_BASE_URL | openai-base-url | OpenAI-compatible base URL |
BNERD_OPENAI_MODEL | openai-model | OpenAI-compatible model name |
BNERD_AI_SHELL_UNRESTRICTED | ai-shell-unrestricted | Allow arbitrary shell commands |
BNERD_AI_TOKEN_BUDGET | ai-token-budget | Max tokens per AI session |
Alternative API Key Variables¶
In addition to the BNERD_ prefixed variables, these standard environment variables are also recognized:
| Environment Variable | Equivalent to | Description |
|---|---|---|
ANTHROPIC_API_KEY | BNERD_ANTHROPIC_KEY | Standard Anthropic SDK variable |
OPENAI_API_KEY | BNERD_OPENAI_KEY | Standard OpenAI SDK variable |
These alternatives are checked only when the BNERD_ prefixed version is not set.
Precedence¶
Environment variables override values from the config file but are overridden by command-line flags: