Skip to main content

Commands Reference

Comprehensive reference for muonroi-cli top-level commands, slash commands, agent modes, and keyboard shortcuts.

Top-Level CLI Commands

These commands run outside the TUI, useful for scripting, CI/CD, and headless workflows.

CommandDescriptionExample
(no args)Enter interactive TUI with built-in agentmuonroi-cli
"<prompt>"Start TUI with initial messagemuonroi-cli "fix the flaky test"
--promptHeadless mode with formatted outputmuonroi-cli --prompt "run tests" --format json
modelsList all available models with pricingmuonroi-cli models
doctorHealth check for CLI dependencies and servicesmuonroi-cli doctor
updateUpdate muonroi-cli to the latest releasemuonroi-cli update
uninstallRemove installed binary and optional datamuonroi-cli uninstall --dry-run
daemonStart the schedule daemon for scheduled tasksmuonroi-cli daemon --background

Configuration & Keys

CommandDescriptionExample
configEdit settings interactivelymuonroi-cli config
keys set <provider>Store provider API key in OS keychainmuonroi-cli keys set anthropic
keys listShow all stored keys (masked)muonroi-cli keys list
keys delete <provider>Remove a provider key from keychainmuonroi-cli keys delete openai
keys login <provider>OAuth subscription login (e.g., openai)muonroi-cli keys login openai
keys logout <provider>OAuth subscription logout and token revokemuonroi-cli keys logout openai
keys import-bw [providers...]Import keys from Bitwarden vaultmuonroi-cli keys import-bw anthropic openai
keys cleanup-settingsStrip plaintext keys from settings.jsonmuonroi-cli keys cleanup-settings
keys set-chat <id>Store chat service secret (discord/slack)muonroi-cli keys set-chat discord-token

Cost & Usage Analysis

CommandDescriptionExample
usage reportAggregate cost by model, role, phase, or callsitemuonroi-cli usage report --by model --json
usage pilAttribute system-prompt size growth to PIL layersmuonroi-cli usage pil --top 10 --json
usage forensics <prefix>Per-event token + cache breakdown for a sessionmuonroi-cli usage forensics abc123 --json

MCP (Model Context Protocol)

CommandDescriptionExample
mcp setup-researchConfigure web research servers (context7, tavily)muonroi-cli mcp setup-research
mcp set <id>Store MCP secret key in OS keychainmuonroi-cli mcp set tavily
mcp import-bw [keys...]Import MCP secrets from Bitwardenmuonroi-cli mcp import-bw tavily

Other Commands

CommandDescriptionExample
bug-reportGenerate anonymized diagnostic bundlemuonroi-cli bug-report
mcp-driverRun the agent-harness MCP driver (stdio)muonroi-cli mcp-driver
share <user>Add stakeholder to product Discord channelmuonroi-cli share @alice --product myproduct

Slash Commands

Slash commands run inside the TUI and interact with the agent state, planning system, and experience engine.

CommandArgumentsDescriptionNotes
/ideal"<idea>" [flags]Start product ideal loop (idea → shipped sprint)See flags below
/ideal status[runId]List active runs or show detail of one--max-cost, --max-sprints, --done-threshold
/ideal resume<runId>Resume a halted or crashed ideal runSkips deployment gate if conditions met
/ideal abort<runId>Hard-kill an ideal runCannot be undone; deletes run artifacts
/ideal ship<runId>Force user-approval deployment gateBypasses conditions #1-#4 if already passing
/council[rounds] <topic>Multi-model debate — models discuss a topicDefault: 3 rounds from same provider
/council inspect<session-id>Inspect debate state from a past council sessionShows all participant contributions
/discuss[<gray-area>]Create or load a planning run; capture gray areasStores in .muonroi-flow/runs/
/plan(no args)Write plan to roadmap; gated on resolved gray areasBlocks if G-entries marked [open]
/execute(no args)Read plan from roadmap, set state to executingFollows the plan written in /plan
/clear(no args)Relock state from artifacts, discard chat contextSummarizes decisions, gray areas, roadmap
/compact(no args)Perform two-pass message compactionReduces token usage, flags stale suggestions to EE
/cost(no args)Show session cost, model, tier, token usageIncludes EE health and activity pulse
/config(no args)Edit settings in TUI (API key, model, providers)Opens interactive settings editor
/ee search<query>Semantic search of experience brainReturns relevant lesson entries
/ee status(no args)Show EE connection status and statsDisplays intercepts, suggestions, lessons
/debug[on|off|status]Toggle pipeline debug tracingShows PIL → Router → EE → Model → Tokens
/export(no args)Export chat history and artifactsCompares persisted DB state vs screen state
/expand(no args)Expand message context (inverse of compact)Restores full message history
/pin[<msg-id>]Pin or unpin messages from compactionPinned messages always included in compact
/optimize(no args)Tune system-prompt and cache strategySuggests layer reductions, cache policies

/ideal Flags

FlagDefaultRangeDescription
--max-cost501..1000Max USD spend for full run
--max-sprints81..20Max iterations before termination
--done-threshold0.90.7..1.0Confidence required for done gate (clamped)
--stack(none)textFree-form stack description hint
--no-prior-context(off)flagSkip cross-run workspace memory injection
--force-council(off)flagAlways run full council even for low-complexity

Agent Modes

The agent runs in one of three modes controlled by config or environment:

ModeDescriptionBest ForCommand Example
agentFull autonomous coding agent with tool useDevelopment, feature implementationMUONROI_MODE=agent muonroi-cli
planPlanning only — no tool executionArchitecture & design reviewMUONROI_MODE=plan muonroi-cli
askQ&A without tool use — reads files, answersQuestions, code review, researchMUONROI_MODE=ask muonroi-cli

Default mode is agent. Set via ~/.muonroi-cli/user-settings.json or MUONROI_MODE env var.

Keyboard Shortcuts

Key(s)Action
Ctrl+CExit TUI
Ctrl+DCancel current input; exit if at prompt
TabCycle through available modes/agent roles
Shift+EnterSubmit multi-line input
Ctrl+LClear screen
Ctrl+AGo to start of line
Ctrl+EGo to end of line
Ctrl+UKill line (delete from cursor to start)
Ctrl+KKill line (delete from cursor to end)
Ctrl+WDelete word backward
Ctrl+FForward character
Ctrl+BBackward character
Ctrl+PPrevious history entry
Ctrl+NNext history entry

Additional keys may be customized via ~/.muonroi-cli/user-keybindings.json.

Environment Variables

VariableTypeDescriptionExample
MUONROI_API_KEYStringAPI key for default provider (legacy)sk-ant-...
MUONROI_MODELStringOverride default model (suppresses routing)claude-opus-4-1
MUONROI_MODEStringAgent mode: agent, plan, or askMUONROI_MODE=plan
MUONROI_DEVBooleanEnable development features (e.g., debug output)MUONROI_DEV=1
MUONROI_EE_URLURLExperience Engine server URLhttp://localhost:8082
MUONROI_EE_AUTH_TOKENStringEE authentication token(from EE setup)
MUONROI_DISCORD_TOKENStringDiscord bot token for /share(from Discord dev portal)
MUONROI_DISCORD_GUILD_IDStringDiscord guild/server ID for /share(from Discord)
MUONROI_TEST_NO_KEYCHAINBooleanSuppress OS keychain in testsMUONROI_TEST_NO_KEYCHAIN=1

Configuration Files

All config files live in ~/.muonroi-cli/:

FilePurpose
user-settings.jsonGlobal user settings (API key, model defaults, providers)
.muonroi-cli/settings.jsonPer-project overrides (checked into repo)
user-keybindings.jsonKeyboard shortcut customization
crash.logCrash and unhandled rejection logs

Project-specific settings in .muonroi-cli/settings.json override global user-settings.json.

Headless / CI Mode

For automation and CI/CD pipelines:

# Run with prompt, output JSON
muonroi-cli --prompt "run tests" --format json

# Inspect session costs
muonroi-cli usage forensics <session-prefix> --json

# Check CLI health
muonroi-cli doctor

All headless commands exit with code 0 on success, 1 on failure.