
Security News
GPT-6 Astra Attempts Supply Chain Attacks Against Open Source Maintainers in Testing
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.
@minimax-ai/code
Advanced tools
English | 简体中文
An AI coding agent for your terminal. MiniMax Code understands your codebase, edits files, runs commands and tests, and keeps the work in resumable Sessions.
Use it as an interactive TUI, run it headlessly in scripts and CI, or connect it to an ACP-compatible client.
Requires Node.js 22.19+ on Node 22, or Node.js 24–26.
npm install -g @minimax-ai/code
cd your-project
mcode
Then describe the outcome you want:
Find the cause of the intermittent 500 error in the login endpoint, fix it, and run the relevant tests.
MiniMax Code will inspect the repository, make the requested changes, run the checks it can, and summarize what it verified.
| Capability | What it gives you |
|---|---|
| Codebase understanding | Search files, trace call paths, explain architecture, and identify impact before editing |
| End-to-end execution | Edit code, run commands, and verify changes with the repository's own tools |
| Resumable work | Keep each task in a Session and continue where you left off |
| Human control | Review plans and choose how much access the agent has before sensitive operations |
| Flexible workflows | Work interactively, automate with structured output, or integrate over ACP |
| Extensibility | Choose models and Providers, and add new capabilities with Plugins |
Start in the current directory:
mcode
Or start with a task already attached:
mcode "Explain this repository and identify the highest-priority technical debt."
While MiniMax Code is working, press Enter to steer the active turn or Alt+Enter to queue a
follow-up for the next turn. Use Alt+Up (or Shift+Left) to move the latest queued message back
into the Composer before steering it with Enter.
Useful Session commands:
# Continue the latest Session for this workspace
mcode --continue
# Browse Sessions or open one by ID
mcode --session
mcode --session <session-id>
Inside the TUI, /sessions opens the Session Center for recent/archived Sessions, workspace/all
scope, rename, archive/restore, and search. Search accepts plain text plus id:, path:, type:,
status:, and model: filters. /history opens the current Session's input history and lets you
preview a safe fork, edit, conversation rewind, or conversation-and-files rewind using the existing
confirmation flow. While a response is running, history remains browse-only.
Inside the TUI, use /export to save the current Session as Markdown. Use /checkin to claim the
daily MiniMax account reward. If the TUI does not have a managed MiniMax login, it opens the
existing /login region and browser flow first, then resumes check-in once after successful
authentication. The result labels the server cycle day separately from the current streak, using
the same streak calculation as the desktop card.
Runtime background work appears above the Composer as a summary plus up to three task rows.
Additional tasks are summarized as … N more.
mcode exec runs a task without opening the TUI:
# Run one task
mcode exec "Review the current changes and run the relevant tests."
# Choose a repository and attach supporting context
mcode exec --cwd ./repo --file error.log "Find the cause of this build failure."
# Produce machine-readable output
mcode exec --output-format json "Summarize the current branch."
For automation, --output-schema accepts an inline JSON object or file path and constrains the
model's final answer for Anthropic Messages, OpenAI Responses, and Chat Completions. The outer
--output-format json value remains a stable ExecResult; models without strict Structured Output
support fail before the Turn starts. --output-last-message is written atomically only after the
final answer passes validation and Runtime completes its bounded shutdown. Use
--output-format stream-json to stream progress.
Run mcode exec --help for the complete set of headless options.
Start the Agent Client Protocol server over stdin/stdout:
mcode acp
ACP-compatible editors and agent clients can use it to create, load, resume, and close MiniMax Code Sessions.
Sign in with MiniMax:
mcode login
Use /model in the TUI to select a model and reasoning level. Select Add 3rd-party provider… to
search models.dev or configure a Custom Provider. API keys stay masked in the form, and Runtime
tests the connection before saving and applying the selected model. Use the Provider commands to
inspect or configure model sources:
mcode provider list
mcode provider test <provider-id>
mcode provider add --name <name> --base-url <url> --model <model-id>
mcode provider remove <provider-id> --yes
Browse and manage Plugins from the command line:
mcode plugin list --available
mcode plugin add <plugin-id>
mcode plugin enable <plugin-id>
mcode plugin disable <plugin-id>
Run mcode plugin without arguments to open the interactive Plugin manager.
MiniMax Code reads HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, and NO_PROXY, including their
lowercase variants:
export HTTPS_PROXY=http://127.0.0.1:7890
mcode
localhost, 127.0.0.1, and ::1 always bypass the proxy.
Plan Mode lets you review an implementation plan before any code changes begin. Permission modes let you choose the right balance between confirmation and autonomy for the current task:
Keep the narrowest mode that still fits your workflow, especially when working in an unfamiliar repository.
| Command | Purpose |
|---|---|
mcode [prompt] | Start the interactive TUI |
mcode --continue | Continue the latest Session for the current workspace |
mcode --session [id] | Browse Sessions or open one by ID |
mcode exec [prompt] | Run a headless task |
mcode init [directory] | Analyze a repository and create or improve AGENTS.md |
mcode login / logout | Manage MiniMax authentication |
mcode provider ... | Manage model Providers |
mcode plugin ... | Browse and manage Plugins |
mcode acp | Start the ACP server |
mcode update | Check for and install updates |
Run mcode --help or mcode <command> --help for all options available in your installed version.
See CHANGELOG.md for user-visible changes in stable releases.
mcode: command not foundMake sure the global npm bin directory is in PATH, then run:
npm list -g @minimax-ai/code --depth=0
npm prefix -g
Supported versions are Node.js >=22.19 <23 and >=24 <27. Node 23 is not supported. After
switching Node.js versions, reinstall MiniMax Code:
node --version
npm install -g @minimax-ai/code
Check the installed version, sign-in state, and Provider connectivity:
mcode --version
mcode login
mcode provider list
mcode provider test <provider-id>
# Check for and install updates
mcode update
# Uninstall
npm uninstall -g @minimax-ai/code
MIT
FAQs
Minimax Code — terminal coding agent
The npm package @minimax-ai/code receives a total of 2,770 weekly downloads. As such, @minimax-ai/code popularity was classified as popular.
We found that @minimax-ai/code demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.

Security News
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.