Skip to content

Configuration File

The bnerd configuration file is a YAML file located at ~/.bnerd.yaml by default.

File Location

Method Location
Default ~/.bnerd.yaml
Override --config /path/to/config.yaml
Environment BNERD_CONFIG=/path/to/config.yaml

The file is created with 0600 permissions (owner read/write only) to protect sensitive values like tokens.

Complete Schema

# Connection
api-url: https://api.bnerd.cloud        # CloudAPI base URL
token: your-bearer-token               # Authentication token
org-id: your-organization-id           # Organization ID
project-id: your-project-id           # Project ID (optional)
region: de-muc1                        # Cloud region

# Output
output: table                          # Default output format (json|table|yaml)
debug: false                           # Enable debug output

# AI features
anthropic-key: sk-ant-...             # Anthropic API key
ai-model: haiku                        # Model: haiku, sonnet, opus, or full ID
ai-mode: read-only                     # Safety: read-only, non-destructive, full
ai-provider: anthropic                 # Provider: anthropic or openai
openai-key: sk-...                     # OpenAI API key
openai-base-url: ""                    # OpenAI-compatible backend URL
openai-model: ""                       # Model name for OpenAI backend
ai-shell-unrestricted: false           # Allow arbitrary shell commands
ai-token-budget: 0                     # Max tokens per session (0 = unlimited)

# Slack integration (optional, used by :pa Personal Assistant mode)
slack:
  enabled: false                       # Master switch
  bot-token: xoxb-...                  # Bot user OAuth token
  app-token: xapp-...                  # App-level token (Socket Mode)
  user-token: xoxp-...                 # Optional; enables slack_search, mention catchup, user-scope poller
  signature-suffix: "— via bnerd.ai"   # Appended to outgoing replies; "-" disables
  backfill-days: 30                    # First-run + per-subscription history pull; 0 → 30, negative skips
  retention-days: 90                   # Inbox rolling window before files become "archived"
  catchup-on-start: true               # Run gap-fill at listener startup
  user-poll-enabled: true              # User-scope poller toggle; default true iff user-token set
  poll-interval: 30s                   # User-scope poller cadence; floor 5s
  subscriptions-path: ""               # Override registry path; empty = $XDG_STATE_HOME/bnerd/slack-inbox/subscriptions.json

# VPN configuration
vpn:
  private-key: ""                      # WireGuard private key (auto-generated)
  public-key: ""                       # Derived public key (auto-generated)
  server-endpoint: vpn.bnerd.net:51820 # WireGuard server address
  server-public-key: ""                # Server's WireGuard public key
  client-address: 10.8.0.2/24         # Client VPN IP address
  allowed-ips: 10.8.0.0/24            # IP ranges routed through VPN
  dns: 1.1.1.1                        # DNS server for VPN
  interface: bnerd0                    # WireGuard interface name
  config-dir: /etc/wireguard          # WireGuard config directory
  cleanup-config: false                # Remove config files on disconnect

Field Reference

Connection Fields

Field Type Required Default Description
api-url string Yes https://api.bnerd.cloud CloudAPI base URL
token string Yes Bearer token for authentication
org-id string Yes* Organization ID (*required for most commands)
project-id string No Project ID (required for project-scoped commands)
region string No de-muc1 Cloud region

AI Fields

Field Type Required Default Description
anthropic-key string No Anthropic API key
ai-model string No haiku AI model selection
ai-mode string No read-only AI safety mode
ai-provider string No anthropic AI provider
openai-key string No OpenAI-compatible API key
openai-base-url string No OpenAI-compatible base URL
openai-model string No OpenAI-compatible model name
ai-shell-unrestricted bool No false Allow arbitrary shell commands
ai-token-budget int No 0 Max tokens per session

Slack Fields

Field Type Required Default Description
slack.enabled bool No false Master switch — listener and tools are inert when false
slack.bot-token string If enabled Bot user OAuth token (xoxb-…)
slack.app-token string For listener App-level token (xapp-…) — required for Socket Mode
slack.user-token string No Optional user token (xoxp-…) — enables slack_search, mention catchup, and the user-scope poller / subscriptions
slack.signature-suffix string No — via bnerd.ai Appended to outgoing replies; - disables
slack.backfill-days int No 30 First-run + per-subscription history pull window; negative skips
slack.retention-days int No 90 Inbox rolling window before monthly files become "archived"
slack.catchup-on-start bool No true Run gap-filling fetch at listener startup
slack.user-poll-enabled bool No true if user-token set, else false Toggle the user-scope poller
slack.poll-interval duration No 30s User-scope poll cadence (e.g. 15s, 2m); floor 5s
slack.subscriptions-path string No XDG default Override the on-disk subscription registry path

See Slack integration for the full setup guide.

VPN Fields

See VPN Configuration for detailed documentation of the vpn: block.

Managing Configuration

# Create config file with defaults
bnerd config init

# Set individual values
bnerd config set api-url https://api.bnerd.cloud
bnerd config set token YOUR_TOKEN

# View current configuration
bnerd config show