Configuration /config

API Keys

muxd supports multiple providers. Set API keys via environment variables or /config:

/config set anthropic.api_key sk-ant-...
/config set openai.api_key sk-...
/config set brave.api_key BSA...

Or use environment variables:

export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-..."

Resolution order: environment variable > /config set preference.

/config Subcommands

CommandDescription
/config showShow all current preferences
/config set <key> <value>Set a preference
/config resetReset all preferences to defaults
/config modelsShow available models and pricing
/config toolsShow available tools
/config messagingShow messaging/Telegram config
/config themeShow theme settings

/config set Keys

Provider Keys

KeyDescription
anthropic.api_keyAnthropic API key
openai.api_keyOpenAI API key
brave.api_keyBrave Search API key (for web search tool)

Model

KeyDescription
modelDefault model (e.g. claude-sonnet, gpt-4o, claude-opus)

Footer Display

KeyTypeDefaultDescription
footer.tokensbooltrueShow token count
footer.costbooltrueShow estimated cost
footer.cwdbooltrueShow current working directory
footer.sessionbooltrueShow session info
footer.keybindingsbooltrueShow keybinding hints

Telegram

KeyDescription
telegram.bot_tokenTelegram bot token
telegram.allowed_idsComma-separated allowed Telegram user IDs

Twitter / X

KeyDescription
twitter.bearer_tokenBearer token for X API v2 (primary auth method)
twitter.api_keyX API key
twitter.api_secretX API secret
twitter.client_idOAuth 2.0 client ID
twitter.client_secretOAuth 2.0 client secret
twitter.access_tokenOAuth access token
twitter.refresh_tokenOAuth refresh token

Environment variable fallback: TWITTER_BEARER_TOKEN

Scheduler

KeyDescription
scheduler.allowed_toolsComma-separated list of tools the scheduler may run

Boolean values accept: true/false, on/off, yes/no, 1/0 (case-insensitive).

Model Aliases

Use short aliases instead of full model IDs:

AliasResolves to
claude-sonnetclaude-sonnet-4-6
claude-haikuclaude-haiku-4-5-20251001
claude-opusclaude-opus-4-6

The anthropic/ prefix is optional: anthropic/claude-sonnet and claude-sonnet are equivalent.

/config set model claude-opus

Pricing

muxd tracks estimated costs per session.

Built-in pricing

ModelInput ($/1M tokens)Output ($/1M tokens)
claude-opus-4-6$5.00$25.00
claude-sonnet-4-6$3.00$15.00
claude-haiku-4-5-20251001$1.00$5.00

Custom pricing

Override or add pricing in ~/.config/muxd/pricing.json:

{
  "my-custom-model": {
    "input": 1.0,
    "output": 5.0
  }
}

Values are dollars per million tokens. Custom entries merge with defaults.

Data Directory

PathContents
~/.config/muxd/config.jsonUser preferences and API keys
~/.config/muxd/pricing.jsonCustom pricing overrides
~/.local/share/muxd/muxd.dbSQLite database (sessions and messages)