MiniMax-AI/minimax-code

An open-source coding agent for your terminal, powered by MiniMax.

MiniMax Code – a terminal‑based coding assistant

What it is – MiniMax Code (often invoked as mcode) is a command‑line tool that lets you talk to a Large Language Model (LLM) to understand, edit, and test code right from your terminal. It works with MiniMax’s own hosted models, a “Token Plan” account, or any OpenAI‑ or Anthropic‑compatible endpoint you provide.

Core capabilities

Capability What you can do
Interactive TUI Open a text‑based UI, describe a task (e.g., “fix the failing test”), and watch the agent read files, propose diffs, run commands, and apply changes.
Headless/CI mode mcode exec "<prompt>" runs without UI – perfect for scripts, CI pipelines, or batch evaluation.
Model flexibility Use a MiniMax account or add your own provider via mcode provider add …. Supports OpenAI‑style completions, OpenAI‑style responses, and Anthropic‑style messages.
Tool use The agent can invoke built‑in search, file‑system browsing, shell commands, and media tools (mcode-tools). Permissions and sandboxing keep execution safe.
Session management Resume previous work (mcode --continue), pick a past session (mcode --session), or export a plan via the “Plan Mode” toggle.
Editor integration Via the Agent Client Protocol (ACP) you can hook the CLI into editors that understand the protocol.

Quick start

  1. Install – one‑liner installer (macOS/Linux/WSL) or PowerShell script for Windows, or npm i -g @minimax-ai/code. The installer also pulls a compatible Node.js runtime if needed.
  2. Log inmcode login (or --region global for non‑China accounts). Alternatively set MCODE_PROVIDER_API_KEY and add a custom provider.
  3. Runcd /path/to/your/project && mcode (interactive) or mcode "Fix the failing test" (single‑prompt). Use shortcuts inside the UI (Enter to send, Alt+Enter to queue, Shift+Tab to toggle plan mode, etc.).

Installation details

  • Default install location: ~/.minimax-code (POSIX) or %USERPROFILE%\.minimax-code (Windows). The CLI binary is mcode (or mcode.cmd/.ps1).
  • User data (login tokens, provider configs, session history) lives in ~/.minimax (or a custom directory via MINIMAX_DATA_DIR).
  • Uninstall by deleting the install folder and optionally the ~/.minimax data directory; the README provides exact shell commands.

Building from source

git clone https://github.com/MiniMax-AI/minimax-code.git
cd minimax-code
pnpm install --frozen-lockfile   # requires Node 22‑26 and pnpm 9.12+
pnpm build
pnpm mcode   # runs the freshly built CLI

The source checkout produces the same CLI that is published as the npm package @minimax-ai/code@0.4.12.

Documentation & help

  • Full docs: docs/README.md
  • Example tasks: docs/examples.md
  • FAQ / troubleshooting: docs/installation.md#faq
  • Issues: open on GitHub (collaborators can PR, others should file an issue).

License – The project's own code is MIT‑licensed (see LICENSE). Third‑party dependencies retain their original licenses, listed in THIRD_PARTY_NOTICES.md.


MiniMax Code is a genuine open‑source AI‑powered coding assistant that brings LLM‑driven code understanding, editing, and testing to the terminal.

Related

  • Project
  • Project
  • Project
  • Project