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
- 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. - Log in –
mcode login(or--region globalfor non‑China accounts). Alternatively setMCODE_PROVIDER_API_KEYand add a custom provider. - Run –
cd /path/to/your/project && mcode(interactive) ormcode "Fix the failing test"(single‑prompt). Use shortcuts inside the UI (Enterto send,Alt+Enterto queue,Shift+Tabto toggle plan mode, etc.).
Installation details
- Default install location:
~/.minimax-code(POSIX) or%USERPROFILE%\.minimax-code(Windows). The CLI binary ismcode(ormcode.cmd/.ps1). - User data (login tokens, provider configs, session history) lives in
~/.minimax(or a custom directory viaMINIMAX_DATA_DIR). - Uninstall by deleting the install folder and optionally the
~/.minimaxdata 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