Command-line reference
Mogick CLI has three primary entry points: mogick starts the interactive TUI, mogick run executes a task non-interactively, and mogick acp starts the stdio JSON-RPC runtime for an ACP host. Other subcommands manage sessions, MCP servers, diagnostics, updates, and plugins.
Command overview
| Command | Purpose |
|---|---|
mogick | Launch interactive TUI |
mogick run [PROMPT] | Execute a task non-interactively; you can also use - to read prompt from stdin |
mogick acp | Start the ACP runtime |
mogick sessions | Manage sessions and export history |
mogick mcp | View or configure MCP servers |
mogick setup | Log in through OAuth device code and write global authentication credentials |
mogick logout | Clear OAuth credentials from effective global auth while retaining API keys |
mogick setup skill | Configure the default location for new Skills |
mogick doctor | Check configuration, authentication, the runtime environment, and network connectivity |
mogick upgrade | Check for and install updates |
mogick version | Print version information |
mogick completion | Generate a shell-completion script |
mogick plugin | Manage plugins such as MWorks |
mogick --resume <session-id>
mogick run "fix all lint errors"
echo "explain this" | mogick run -
mogick run "generate a commit message" -o msg.txtmogick run
run always uses Agent mode. In 26.9.11, -o redirects the run renderer output, not just the final answer. With --json, the file contains JSONL events. See Run mode.
| Option | Description |
|---|---|
--json | Output JSON events |
-o, --output-last-message <file> | Write run output to a file (26.9.11 behavior) |
--non-interactive | Disable interactive prompts; automatically enabled when stdin is a pipe |
--resume <id> | Resume execution in the specified session |
--tool-call-permissions <policy> | Select the read, workspace, auto, or yolo permission policy |
--verbose | Output verbose tool trace |
--logs-path <file> | Specify diagnostic log file |
--no-auto-upgrade | Skip update check at startup |
--yolo | Deprecated; use --tool-call-permissions yolo instead |
mogick run --tool-call-permissions read "Review the source code without changing files"workspace does not automatically allow arbitrary shell commands. In non-interactive runs, calls requiring approval are denied. Run the project's documented test command separately and check its result; a successful agent run does not prove tests passed.
mogick sessions
Use mogick sessions list to list sessions for the current workspace. --json is a persistent argument to sessions, available to its subcommands that support JSON output.
| Subcommand | Description |
|---|---|
list | List sessions, including records with status closed |
create [title] | Create a session |
rename <id> <title> | Rename session |
delete <id> | Delete the session and associated persistent records, including history; not a transition to closed. After success, the session cannot be resumed or exported |
feedback <id> <run-id> <like|dislike> | Submit feedback; dislike can be appended with --reason |
export <id> | Export readable history, or JSON with sessions --json |
mogick sessions list
mogick sessions export abc123
mogick sessions --json export abc123See Session export for formats and limitations.
mogick mcp
MCP configuration is loaded from global <config-dir>/mcp.json and project .mogick/mcp.json. A project server overrides a global server with the same name.
| Subcommand | Description |
|---|---|
list | List configuration, enabled state and source; does not test connectivity |
setup | Configure a server interactively |
mogick mcp list
mogick mcp setupmogick doctor
doctor renders Markdown diagnostic reports by default.
| Option | Description |
|---|---|
--json | Output JSON |
--format md|json | Specify report format |
--export <path> | Write raw report to file |
--check-network | Check network service connectivity |
--check-terminal-font | Interactively check terminal font and character display |
--all | Perform both network and terminal checks |
--verbose | Output detailed information |
--logs-path <file> | Specify log file |
mogick doctor
mogick doctor --json
mogick doctor --format md
mogick doctor > ./diagnostics.md
mogick doctor --format json --export ./diagnostics.json
mogick doctor --check-network
mogick doctor --check-terminal-fontSetup, upgrade, version, and completion
mogick setup saves OAuth credentials and fills missing official provider/default/light-model configuration without replacing explicit model choices. mogick logout clears OAuth credentials from the effective global auth file, retaining API keys and project credentials. See Authentication.
mogick upgrade --dry checks for updates without installing them. mogick version --verbose prints additional build information. completion supports Cobra-compatible shells, including Bash, Zsh, Fish, and PowerShell.
mogick setup
mogick upgrade
mogick upgrade --drymogick plugin
Inspect installed plugins with the following commands; this page does not cover plugin installation or recovery.
mogick plugin list
mogick plugin inspect <plugin-id>Root options
Only --no-auto-upgrade is inherited by subcommands. Place other options after the root command or the subcommand that owns them.
| Option | Root | run | acp |
|---|---|---|---|
--verbose | ✓ | ✓ | ✓ |
--logs-path <file> | ✓ | ✓ | ✓ |
--no-auto-upgrade | ✓ | ✓ | Inherited |
--non-interactive | ✓ | ✓ | — |
--resume <id> | ✓ | ✓ | — |
--continue | ✓ | ✓ | — |
--tool-call-permissions <policy> | ✓ | ✓ | — |
--yolo (deprecated) | ✓ | ✓ | — |
--json | — | ✓ | — |
-o, --output-last-message <file> | — | ✓ | — |
For option values and behavior, see CLI flags.
Path placeholders <config-dir> and <db-path> refer to the effective profile/channel paths; see Data directories.