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
Slack integration Environment Variable Config Key Description BNERD_SLACK_ENABLED slack.enabled Master switch (true/false) BNERD_SLACK_BOT_TOKEN slack.bot-token Bot user OAuth token (xoxb-…) BNERD_SLACK_APP_TOKEN slack.app-token App-level token (xapp-…) for Socket Mode BNERD_SLACK_USER_TOKEN slack.user-token Optional user token (xoxp-…) — enables slack_search, mention catchup, and the user-scope poller BNERD_SLACK_SIGNATURE_SUFFIX slack.signature-suffix Outgoing-message suffix; - disables BNERD_SLACK_BACKFILL_DAYS slack.backfill-days First-run + per-subscription history pull window BNERD_SLACK_RETENTION_DAYS slack.retention-days Inbox rolling window BNERD_SLACK_CATCHUP_ON_START slack.catchup-on-start Run gap-fill on listener startup BNERD_SLACK_USER_POLL_ENABLED slack.user-poll-enabled Toggle the user-scope poller (true/false) BNERD_SLACK_POLL_INTERVAL slack.poll-interval User-scope poller cadence, e.g. 30s, 2m (floor 5s) BNERD_SLACK_SUBSCRIPTIONS_PATH slack.subscriptions-path Override the on-disk subscription registry path
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 SLACK_BOT_TOKEN BNERD_SLACK_BOT_TOKEN Standard Slack SDK variable SLACK_APP_TOKEN BNERD_SLACK_APP_TOKEN Standard Slack SDK variable SLACK_USER_TOKEN BNERD_SLACK_USER_TOKEN Standard Slack 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:
CLI flags > Environment variables > Config file > Defaults
Example: CI/CD Pipeline export BNERD_API_URL = https://api.bnerd.cloud
export BNERD_TOKEN = $CI_BNERD_TOKEN
export BNERD_ORG_ID = $CI_BNERD_ORG_ID
export BNERD_OUTPUT = json
# No config file needed
bnerd dns zones list | jq '.[].name'