Download MiniMax Code for macOS and Windows. Connect local files, tools and your browser to write code, create presentations, analyze data and automate everyday work.
翻訳待ち
開発ツールTypeScript · HTMLGitHub @MiniMax-AIオンライン所有者未確認
Have you tried it? One tap is enough. No sign-in needed.
An open-source coding agent for your terminal, powered by MiniMax.
翻訳待ち
Loading the full README.
Read the full README ↗Give a blinking pocket pet a focus timer. Then ask: “Make pause a long press, and celebrate when the timer ends.” Watch a request become something you can actually use.
No hardware required. The example runs locally in your browser, with no frontend dependencies. Asking the CLI to edit code requires a MiniMax account with available credits or your own compatible model API; model calls may incur charges. The finished example runs without a model account.
Use the official installer for your platform. It installs the latest CLI, prepares a compatible Node.js runtime when needed, and does not require sudo or administrator privileges. Alpine / musl Linux is not supported by the one-command installer.
macOS / Linux / WSL
curl -fsSL https://filecdn.minimax.chat/public/install.sh | bash
Windows (PowerShell)
irm https://filecdn.minimax.chat/public/install.ps1 | iex
The scripts install into ~/.minimax-code on macOS / Linux / WSL and %USERPROFILE%\.minimax-code on Windows. The launchers are bin/mcode and bin/mcode-tools on POSIX, or mcode.cmd / mcode.ps1 and mcode-tools.cmd / mcode-tools.ps1 on Windows. Set MCODE_INSTALL_DIR before installation to choose a different location. See Uninstall to remove the CLI.
npm — if you already have Node.js 22.19+ (22.x), 24.2+ (24.x), 25, or 26:
npm install -g @minimax-ai/code@latest --registry=https://registry.npmjs.org/ --ignore-scripts=false --include=optional --allow-scripts=@minimax-ai/code,better-sqlite3
The npm command uses the public registry, includes the optional SQLite dependency, and permits the package and SQLite installation scripts. See the installation guide for version pinning and Node.js compatibility.
Reopen your terminal and check the installation:
mcode --version
mcode --help
See the official quick start, features, and troubleshooting.
For a mainland China account:
mcode login
For a Global account:
mcode login --region global
Complete sign-in in your browser, then open mcode and use /status to check your account and /provider to choose a model. Run mcode logout to sign out.
Token Plan requires an account with available credits. Builds from this repository and the published npm CLI @minimax-ai/[email protected] default to ~/.minimax for user data (or ~/.minimax-<profile> when a profile is selected). MINIMAX_DATA_DIR or MAVIS_DATA_DIR can override the data directory. The installer's ~/.minimax-code installation directory is separate from this choice. See Accounts and data before locating or removing configuration and sessions.
BYOK does not require a MiniMax login. Set MCODE_PROVIDER_API_KEY in your current shell, then add a provider. Replace the example URL and model name with your provider's values:
mcode provider add --name my-provider --base-url https://example.com/v1 \
--api-format openai-completions --model my-model \
--api-key-env MCODE_PROVIDER_API_KEY --use
mcode
--use tests the first listed model before saving and selecting it. A failed connection test saves nothing. Omit --use to save without testing or changing the default model. For custom/local models, add --context-limit 32768 --output-limit 4096 (use your server's actual limits). Each value must be a positive safe integer and applies to every repeated --model. Inspect configured limits with mcode provider list --json. Omitting these flags preserves the existing model-limit defaults.
Supported API formats: openai-completions, openai-responses, and anthropic-messages. See the model examples for environment variable setup, connection checks, and model overrides for a single run.
Providers added this way are stored under custom_provider in the active profile's config.yaml; this is the supported path for third-party or self-hosted endpoints, while minimax_api stays reserved for the official MiniMax API. Relays that require Authorization: Bearer on an Anthropic-compatible endpoint can set custom headers in config.yaml; see Third-party relays and custom auth headers.
Clone this repository and copy the starter into a separate directory:
git clone https://github.com/MiniMax-AI/minimax-code.git
cd minimax-code
node examples/pocket-pet/setup.mjs ../my-pocket-pet
cd ../my-pocket-pet
node serve.mjs
Open http://127.0.0.1:4173. In a second terminal, open mcode in my-pocket-pet and paste the first prompt, then the follow-up. Refresh the browser after each change.
Prefer to try the result first? From the repository root, run node examples/pocket-pet/serve.mjs finished and open the same URL. Add ?demo=1 for the visibly labeled 10-second mode.
Full walkthrough and requirements · Small code-repair example · Models, search, and tools
Open the project you want to work on:
cd /path/to/your/project
mcode
Describe your task in the TUI, or submit it directly when you launch MCode:
mcode "Find a failing test, fix the implementation, and run the relevant tests."
Use mcode init . to generate or update project guidance in AGENTS.md. Describe the expected result, allowed changes, and how to verify the task.
This is the beginning of the README. Read the rest at the original. Read the full README ↗