Skip to main content
This page lists the public CLI commands. The installed version is the final contract; run mcode --help or mcode <command> --help for the exact options available locally.

Global entry point

--session, --continue, and the compatibility option --resume <id> cannot be combined.

Task and integration commands

init

Analyze a codebase and generate or update AGENTS.md. The directory defaults to the current directory; the command starts the TUI for the initialization task.

exec

Run one Headless task without starting the TUI. See Headless and CI for input, output, schemas, and exit codes.Starting with 0.4.7, regular tasks support --prompt-mode tui|coding|work, with tui as the default. See Choose task instructions for usage and resume restrictions.

acp

Start an Agent Client Protocol server over stdio. region is cn or global.

Account commands

--region accepts cn or global; omit it for the mainland China account region.

Provider commands

provider add options:Without --api-key-env, the command reads MCODE_PROVIDER_API_KEY. See Configuration and models.

Plugin commands

Update

Check for and install an update supported by the current installation source. Restart the current MCode process after updating.

Exit codes

Stable mcode exec exit codes: