
Product
Microsoft Teams Notifications Are Now Available in Socket
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.
@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 /btw [question] (or /side [question]) to fork a temporary side conversation from the latest
committed conversation boundary without interrupting a running main task. The side conversation
inherits the main conversation's history as read-only context, keeps normal tool permissions, and is
asked not to modify anything unless you explicitly request it; a mutation-capable tool additionally
asks for confirmation before running in a side conversation, regardless of the current permission
mode. Press Ctrl+/ to switch between the
side and main views without ending either (/parent also returns from the side view); the Composer
footer mirrors the main task's state (for example main needs approval or main finished) while
you are on the side view.
Press Ctrl+C on an empty Composer to close and discard the side conversation. Starting /btw
again from the main view replaces the previous side conversation with a fresh fork. Side
conversations are ephemeral: they never appear in /sessions or /resume, and navigating to
another Session discards them.
A no-argument TUI slash command runs only when no message text follows its name (trailing whitespace is allowed). If text follows, the entire line is sent as a regular prompt. Commands that accept arguments continue to run as commands.
The Composer labels live input as Prompt, Command, or Skill and adjusts its Enter action so
the submission behavior is visible before sending. For example, /context is a command while
/context explain this repository is a prompt; a Skill such as /docs explain the API remains a
Skill invocation with instructions.
Agent Team and Runtime background work share one severity-aware Tasks summary line above the
Composer, so a long-running Session does not lose input space as work accumulates. Use /tasks to
open the unified detail view. It lists every task and its state, opens Agent child transcripts with
Enter, retains recent completed Runtime tasks after their results are delivered, and exposes task
metadata without taking ownership of task state. Delivered history does not keep the Composer
summary visible. Ctrl+T continues to open the Todo plan.
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
Desktop and the CLI/TUI share the same OAuth Core credential namespace when their canonical
dataDir, build environment, region, and client ID match. Runtime receives only an in-memory access
token projection. Installing @minimax-ai/code installs both the mcode and mcode-tools commands;
the latter does not depend on starting the TUI to appear on PATH.
Inside a TUI-owned process, mcode-tools obtains short-lived access-token leases from the TUI Auth
Lease Broker. It does not read the host auth.json, persist refresh tokens, or expose a second
login/logout flow. The command remains installed regardless of login state; without a shared MCode
login, brokered calls fail with an authentication-required error. A direct mcode-tools invocation
outside a TUI-owned process remains available; TUI does not rewrite that process's environment or
configuration.
Internal test and staging builds can route OAuth and managed-backend requests through an
explicit lane. Put the global option before the subcommand:
mcode --lane oauth2 login
mcode --lane oauth2
mcode --lane oauth2 exec "Verify the OAuth session"
Production builds reject --lane, and MCode does not infer it from environment variables.
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.

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.

Security News
Socket CTO Ahmad Nassri joins AppSec leaders at Black Hat to discuss active malware, package manager risks, and software supply chain defense.