CLI reference

Use the full-screen app for daily work, milo run for scripts, and milo rpc for a long-lived machine-readable session.

Commands

miloOpen the interactive app in the current directory.
milo -cContinue the newest conversation for this directory.
milo -r <id>Resume a saved conversation by id.
milo run [options] <task>Run one headless task and exit.
milo rpc [options]Keep a JSON-lines session open on stdin and stdout.
milo sessionsList, rename, export, or safely remove saved sessions.
milo providersList endpoints or choose the endpoint for future runs.
milo mcp <command>Add, inspect, call, or remove MCP servers.

Interactive commands

/model [id]       choose the model
/thinking [level]  set reasoning effort
/plan              enter or leave read-only Plan Mode
/status            show model, mode, context, cost, and undo depth
/resume [id]       continue a saved conversation
/undo  /redo       restore or reapply the last task's file changes
/compact [focus]   summarize a long conversation
/skills  /mcp      inspect available extensions
/help              show every command and keyboard shortcut

Press shift+tab to cycle Manual, YOLO, and Plan modes. Type !command to run a shell command and include its output in the conversation; !!command keeps the output out of the model context.

Configuration

Milo stores user configuration in the operating system’s standard config directory: ~/Library/Preferences/milo/config.json on macOS or $XDG_CONFIG_HOME/milo/config.json on Linux. Most settings are written for you by the interactive commands.

{
  "version": 1,
  "models": {
    "active": "anthropic/claude-sonnet-4.5",
    "compact": null,
    "thinking": "default"
  },
  "agent": { "mode": "manual", "compactAt": 0 },
  "provider": "openrouter"
}

Keys

Keys are separate from config.json. Provider environment variables take priority; otherwise Milo uses the OS keychain and falls back to a local credentials file with mode 0600.

Environment variables

OPENROUTER_API_KEY   # key for the default provider
MILO_PROVIDER         # named endpoint for this process
MILO_BASE_URL         # custom OpenAI-compatible endpoint
MILO_STATE_DIR        # redirect config, cache, and session data
MILO_MODEL            # default model for a headless run
MILO_DEBUG            # append raw format errors to a file
NO_COLOR             # disable ANSI colour

Named providers use their own key variables, such as OPENAI_API_KEY, GROQ_API_KEY, and DEEPSEEK_API_KEY.