Skip to main content

CLI Settings Reference

Auto-generated from muonroi-cli/src/utils/settings.ts (UserSettings interface). Run node scripts/check-cli-docs-drift.mjs to detect drift between source and docs.

Where to set

User settings live at ~/.muonroi-cli/user-settings.json (resolved as path.join(os.homedir(), ".muonroi-cli", "user-settings.json"); mode 0o600). Project overrides live at <cwd>/.muonroi-cli/settings.json (subset: model, sandboxMode, sandbox, shell, lsp).

Edit via:

  • /config slash command in the TUI
  • direct JSON edit
  • environment variables (selected fields — see notes per row)

Env-var precedence: MUONROI_MODEL, MUONROI_API_KEY, MUONROI_BASE_URL, OPENAI_API_KEY, GOOGLE_API_KEY, DEEPSEEK_API_KEY, SILICONFLOW_API_KEY, XAI_API_KEY, OLLAMA_URL, TELEGRAM_BOT_TOKEN, and the cost-cap overrides listed below.

Core

KeyTypeDefaultDescription
apiKeystringPrimary Anthropic API key. Env override: MUONROI_API_KEY.
defaultModelstringclaude-sonnet-4-6Default model id; normalized via normalizeModelId. Env override: MUONROI_MODEL.
ecosystem{ name: string; patterns: string[] }Optional ecosystem profile used by discovery.
modeModelsPartial<Record<AgentMode, string>>Per-mode model override applied on mode switch.
reasoningEffortByModelRecord<string, ReasoningEffort>Per-model reasoning-effort overrides.

Council

KeyTypeDefaultDescription
autoCouncilbooleantrueAuto-trigger council debate for qualifying plan/analyze prompts.
autoCouncilConfidencenumber0.85Minimum PIL confidence to auto-trigger council. Range 0.5-1.0.
autoCouncilMinRolesnumber2Minimum configured roleModels required before auto-council fires. Range 1-4.
councilCostAwarebooleantrueDrop trivial leader sub-tasks to a cheaper tier on the same provider. Synthesis and debate-plan always use the leader model.
councilExperienceMode"off" | "advisory" | "enforcing""advisory"Experience Engine involvement level in council debates (CQ-19).
councilPreferMultiProviderbooleanfalsePrefer cross-provider role assignment when picking debate participants.
councilRoundsnumber3Number of council debate rounds. Clamped to 1-5.

Discovery

KeyTypeDefaultDescription
discoveryEcosystemBiasbooleantrueWhen true, leader recommendations, debate stances, and research lenses bias toward Muonroi ecosystem packages (BB, templates, agent-harness-*). Set to false for non-Muonroi projects.
eeBBContextbooleantrueBB-aware Experience Engine context injection in /ideal CB-1 council prompts. When false, fetchBBContext returns empty immediately.

Routing

KeyTypeDefaultDescription
roleModelsPartial<Record<"leader" | "implement" | "verify" | "research", string>>Per-role model overrides for council debates.
stepRouter.enabledbooleantrueEnable step-aware routing (downgrade tool-execution steps).
stepRouter.premiumSynthesisbooleanfalseSwitch back to premium model for final synthesis.
stepRouter.toolExecutionTier"fast" | "balanced""fast"Tier used for tool-execution steps.

Cost (caps)

KeyTypeDefaultDescription
autoCompactAfterTurnbooleantrueRun post-turn auto-compact when context exceeds threshold.
autoCompactThresholdPctnumber0.25Minimum % of context window to trigger auto-compact. Range 0.05-0.50.
subAgentBudgetCharsnumber120000Max cumulative chars of tool output a task sub-agent may receive before progressive trimming. Range 20000-600000. Env override: MUONROI_SUB_AGENT_BUDGET_CHARS.
topLevelToolBudgetCharsnumber400000Per-turn cap on cumulative tool-output chars in the top-level orchestrator loop. Range 50000-1500000. Env override: MUONROI_TOP_LEVEL_TOOL_BUDGET_CHARS.

Env-only cost knobs (no UserSettings field):

EnvDefaultRangeDescription
MUONROI_SUBAGENT_COMPACT_KEEP_LAST31-20Trailing tool turns kept verbatim during sub-agent compaction.
MUONROI_SUBAGENT_COMPACT_THRESHOLD_CHARS4000020000-500000Threshold (chars) above which the sub-agent prepareStep compactor rewrites older tool_result parts to stubs.
MUONROI_TOP_LEVEL_COMPACT_KEEP_LAST51-30Trailing tool turns kept verbatim during top-level compaction.
MUONROI_TOP_LEVEL_COMPACT_THRESHOLD_CHARS10000050000-1500000Top-level compactor threshold (chars).

Sandbox

UserSettings.sandboxMode: "off" | "shuru" (default "off") selects the sandbox engine. The sandbox block configures it:

KeyTypeDefaultDescription
sandbox.allowEphemeralInstallbooleanAllow ad-hoc package installs inside the sandbox.
sandbox.allowNetbooleanAllow outbound network from inside the sandbox.
sandbox.allowedHostsstring[]Hostname allowlist when allowNet is true.
sandbox.cpusnumberCPU count cap for the sandbox VM/container.
sandbox.diskSizenumberDisk size (engine-specific units).
sandbox.fromstringBase image / checkpoint reference.
sandbox.guestWorkdirstringWorking directory inside the guest.
sandbox.hostBrowserCommandsOnHostbooleanRun host-browser commands on the host instead of in-guest.
sandbox.memorynumberMemory cap (engine-specific units).
sandbox.portsstring[]Port mappings as host:guest strings (e.g. "3000:3000").
sandbox.secrets{ name: string; fromEnv: string; hosts: string[] }[]Injected secret descriptors (env var pulled per host allowlist).
sandbox.shellInitstring[]Shell init lines prepended before commands run inside the sandbox.
sandbox.syncHostWorkspacebooleanSync the host workspace into the guest.
sandbox.verifyBaseFromstringBase image used specifically by the verify flow.

MCP

KeyTypeDefaultDescription
mcp.serversMcpServerConfig[][]Configured MCP servers. Each: id, label, enabled, transport ("http" | "sse" | "stdio"), url?, headers?, command?, args?, env?, cwd?.

LSP

KeyTypeDefaultDescription
lsp.autoInstallbooleanfalseAuto-install missing language servers.
lsp.builtinsRecord<LspBuiltInServerId, LspBuiltInServerSettings>{}Overrides for built-in language servers (enabled, command, args, env, initialization, rootMarkers, extensions).
lsp.diagnosticsDebounceMsnumber200Debounce window (ms) for LSP diagnostics.
lsp.enabledbooleantrueMaster switch for the LSP subsystem.
lsp.serversLspCustomServerConfig[][]User-defined LSP servers.
lsp.startupTimeoutMsnumber30000Max time (ms) to wait for an LSP server to come up.
lsp.toolbooleantrueExpose the LSP tool to the agent.

Telegram

KeyTypeDefaultDescription
telegram.approvedUserIdsnumber[]Telegram user IDs allowed to drive the agent.
telegram.audioInput.enabledbooleantrueTranscribe Telegram voice/audio before sending text to the agent.
telegram.audioInput.languagestring"en"Language code forwarded to the STT endpoint.
telegram.botTokenstringTelegram bot token. Env override: TELEGRAM_BOT_TOKEN.
telegram.nativeDraftsbooleanfalseReserved: Bot API sendMessageDraft (not implemented).
telegram.sessionsByUserIdRecord<string, string>Per-user session bindings.
telegram.streaming"off" | "partial""partial"Live preview while generating. off = buffer-then-send only.
telegram.typingIndicatorbooleantrueSend typing chat action while the agent runs.

Providers

providers.<id> blocks hold per-provider API keys and base URLs. Each non-Ollama provider takes { apiKey: string; baseURL?: string }; Ollama takes { baseURL?: string } only.

KeyTypeDefaultDescription
disabledModelsstring[][]Models hidden from the picker.
disabledProvidersProviderId[][]Providers hidden from the picker (still loaded if keys present).
providers.anthropic{ apiKey: string; baseURL?: string }Anthropic credentials. Also accepts top-level apiKey.
providers.deepseek{ apiKey: string; baseURL?: string }DeepSeek credentials. Env: DEEPSEEK_API_KEY.
providers.google{ apiKey: string; baseURL?: string }Google Gemini credentials. Env: GOOGLE_API_KEY.
providers.ollama{ baseURL?: string }{ baseURL: "http://localhost:11434" }Ollama endpoint. Env: OLLAMA_URL.
providers.openai{ apiKey: string; baseURL?: string }OpenAI credentials. Env: OPENAI_API_KEY.
providers.siliconflow{ apiKey: string; baseURL?: string }SiliconFlow credentials. Env: SILICONFLOW_API_KEY.
providers.xai{ apiKey: string; baseURL?: string }xAI / Grok credentials. Env: XAI_API_KEY.

Other

KeyTypeDefaultDescription
hooksHooksConfigPreToolUse/PostToolUse hook configuration.
paymentsPaymentSettings{ enabled: false, chain: "base-sepolia", approval: { autoApprove: false } }DEPRECATED — Phase 4 will replace with LemonSqueezy billing. Wallet UI only.
shellShellSettingsShell used by the bash tool. On Windows, defaults to Git Bash when present.
subAgentsCustomSubagentConfig[]User-defined sub-agents (name, model, instruction). Names matching general/explore/vision/verify/verify-detect/verify-manifest/computer are rejected.
webResearchPromptedbooleanTrue after the user has been prompted (or skipped) the web-research onboarding.