Skip to main content
MiniMax Code CLI is the terminal entry point for developer workflows in MiniMax Code. It complements the desktop app: the app is well suited to visual task management and result review, while the CLI stays close to code repositories, terminals, scripts, CI, and editors.

Three Ways to Use the CLI

Interactive TUI

Run mcode to explore code, continue conversations, review tool calls, and manage sessions from your terminal.

Headless

Run one task with mcode exec and pass structured results to scripts, CI, or evaluation workflows.

ACP

Run mcode acp to connect editors and clients that support Agent Client Protocol over standard input and output.

Interactive TUI

Start by Understanding the Repository

MCode reads project rules, the directory structure, relevant implementation, and available scripts from the current workspace. Run mcode init . or /init to analyze the repository and generate or update AGENTS.md, keeping project conventions alongside the code.A typical task follows these steps:
1

Understand the context

Read project conventions, relevant implementation, and test entry points to identify the actual change scope.
2

Make changes

Use file, search, and terminal tools to change code or documentation, with your confirmation for important permissions and decisions.
3

Verify the result

Run relevant tests or checks, address failures, and summarize the changes, evidence, and remaining risks.

Core Capabilities

Headless Mode: Scripts and CI

mcode exec runs without launching the TUI. It is designed for automation, batch processing, and reproducible evaluations.
Common options:Machine-readable output is written to stdout, while diagnostics are written to stderr. Standard input is read only when you explicitly use --input -, preventing CI jobs from waiting for input unexpectedly.

ACP: Connect an Editor

mcode acp runs MCode as an ACP v1 Agent server and transports NDJSON over stdin/stdout. It does not require an additional HTTP service or an MCode-specific editor extension.For example, add the following under External Agents in Zed:
Once connected, Assistant responses, Thinking, tool status, file locations, and diffs can be projected into the editor. Permission prompts, question selection, and cancellation are handled through the same ACP task flow. If the editor cannot find mcode, replace command with the absolute path to the executable.
The stdout stream from mcode acp is reserved for ACP protocol messages. Do not send natural language directly to it or allow wrapper scripts to write logs to stdout.

Command Overview

Run mcode <command> --help to view the complete option contract for your installed version.

Capability Boundaries

  • The CLI does not depend on Electron or desktop IPC. Host capabilities such as Browser and Computer Use are available only when the runtime environment explicitly provides them.
  • Image display, link handling, system clipboard access, and keyboard shortcuts ultimately depend on the terminal emulator and its configuration. Use Ctrl+V when pasting images.
  • TUI, Headless, and ACP target different interaction patterns. An ACP client sees only the commands and input types explicitly supported by the current protocol.