New:Socket for Asana Is Now Available.Learn more
Get Started

@minimax-ai/code

Package Overview
Dependencies
Maintainers
4
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@minimax-ai/code

Minimax Code — terminal coding agent

npmnpm
Version
0.2.6
Version published
Weekly downloads
4K
15.84%
Maintainers
4
Weekly downloads
 
Created
Source

MiniMax Code

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.

Quick start

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.

Why MiniMax Code

CapabilityWhat it gives you
Codebase understandingSearch files, trace call paths, explain architecture, and identify impact before editing
End-to-end executionEdit code, run commands, and verify changes with the repository's own tools
Resumable workKeep each task in a Session and continue where you left off
Human controlReview plans and choose how much access the agent has before sensitive operations
Flexible workflowsWork interactively, automate with structured output, or integrate over ACP
ExtensibilityChoose models and Providers, and add new capabilities with Plugins

Use it your way

Interactive TUI

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 Tab 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.

Headless and CI

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.

ACP clients

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.

Models, Providers, and Plugins

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.

Network proxy

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.

Plans and permissions

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:

  • Ask requests confirmation before operations that need approval.
  • Auto handles routine operations automatically and asks when needed.
  • Full access allows broader execution for environments where you already trust the task and workspace.

Keep the narrowest mode that still fits your workflow, especially when working in an unfamiliar repository.

Command reference

CommandPurpose
mcode [prompt]Start the interactive TUI
mcode --continueContinue 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 / logoutManage MiniMax authentication
mcode provider ...Manage model Providers
mcode plugin ...Browse and manage Plugins
mcode acpStart the ACP server
mcode updateCheck 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.

Troubleshooting

mcode: command not found

Make sure the global npm bin directory is in PATH, then run:

npm list -g @minimax-ai/code --depth=0
npm prefix -g
Unsupported Node.js version

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
Authentication or Provider problems

Check the installed version, sign-in state, and Provider connectivity:

mcode --version
mcode login
mcode provider list
mcode provider test <provider-id>

Update and uninstall

# Check for and install updates
mcode update

# Uninstall
npm uninstall -g @minimax-ai/code

License

MIT

FAQs

Package last updated on 27 Aug 2026

Related posts