Skip to content

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 ​

CommandPurpose
mogickLaunch interactive TUI
mogick run [PROMPT]Execute a task non-interactively; you can also use - to read prompt from stdin
mogick acpStart the ACP runtime
mogick sessionsManage sessions and export history
mogick mcpView or configure MCP servers
mogick setupLog in through OAuth device code and write global authentication credentials
mogick logoutClear OAuth credentials from effective global auth while retaining API keys
mogick setup skillConfigure the default location for new Skills
mogick doctorCheck configuration, authentication, the runtime environment, and network connectivity
mogick upgradeCheck for and install updates
mogick versionPrint version information
mogick completionGenerate a shell-completion script
mogick pluginManage plugins such as MWorks
bash
mogick --resume <session-id>
mogick run "fix all lint errors"
echo "explain this" | mogick run -
mogick run "generate a commit message" -o msg.txt

mogick 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.

OptionDescription
--jsonOutput JSON events
-o, --output-last-message <file>Write run output to a file (26.9.11 behavior)
--non-interactiveDisable 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
--verboseOutput verbose tool trace
--logs-path <file>Specify diagnostic log file
--no-auto-upgradeSkip update check at startup
--yoloDeprecated; use --tool-call-permissions yolo instead
bash
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.

SubcommandDescription
listList 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
bash
mogick sessions list
mogick sessions export abc123
mogick sessions --json export abc123

See 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.

SubcommandDescription
listList configuration, enabled state and source; does not test connectivity
setupConfigure a server interactively
bash
mogick mcp list
mogick mcp setup

mogick doctor ​

doctor renders Markdown diagnostic reports by default.

OptionDescription
--jsonOutput JSON
--format md|jsonSpecify report format
--export <path>Write raw report to file
--check-networkCheck network service connectivity
--check-terminal-fontInteractively check terminal font and character display
--allPerform both network and terminal checks
--verboseOutput detailed information
--logs-path <file>Specify log file
bash
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-font

Setup, 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.

bash
mogick setup
mogick upgrade
mogick upgrade --dry

mogick plugin ​

Inspect installed plugins with the following commands; this page does not cover plugin installation or recovery.

bash
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.

OptionRootrunacp
--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.