MiniMax CLI
Unofficial terminal UI (TUI) + CLI for the MiniMax platform: chat with MiniMax-M2.1, run an approval-gated tool-using agent, and generate media (images, video, music, TTS).
Not affiliated with MiniMax Inc.
Quickstart
- Get an API key from https://platform.minimax.io
- Install and run:
cargo install minimax-cli --locked
export MINIMAX_API_KEY="YOUR_MINIMAX_API_KEY"
minimax
Or download a prebuilt binary from GitHub Releases.
- Press
F1or run/helpfor the in-app command list - If anything looks off, run
minimax doctor
Install
From crates.io (recommended)
cargo install minimax-cli --locked
Build from source
git clone https://github.com/Hmbown/MiniMax-CLI.git
cd MiniMax-CLI
cargo build --release
./target/release/minimax --help
Direct download
Download a prebuilt binary from https://github.com/Hmbown/MiniMax-CLI/releases and put it on your PATH as minimax.
Configuration
On first run, the TUI can prompt for your API key and save it to ~/.minimax/config.toml. You can also create the file manually:
# ~/.minimax/config.toml
api_key = "YOUR_MINIMAX_API_KEY" # must be non-empty
default_text_model = "MiniMax-M2.1" # optional
allow_shell = false # optional
max_subagents = 3 # optional (1-5)
Useful environment variables:
MINIMAX_API_KEY(overridesapi_key)MINIMAX_BASE_URL(default:https://api.minimax.io; China users may usehttps://api.minimaxi.com)MINIMAX_PROFILE(selects[profiles.<name>]from the config; errors if missing)MINIMAX_CONFIG_PATH(override config path)MINIMAX_MCP_CONFIG,MINIMAX_SKILLS_DIR,MINIMAX_NOTES_PATH,MINIMAX_MEMORY_PATH,MINIMAX_ALLOW_SHELL,MINIMAX_MAX_SUBAGENTS
See config.example.toml and docs/CONFIGURATION.md for a full reference.
Modes
In the TUI, press Tab to cycle modes: Normal → Plan → Agent → YOLO → RLM → Duo → Normal.
- Normal: chat; asks before file writes, shell, or paid tools
- Plan: design-first prompting; same approvals as Normal
- Agent: multi-step tool use; asks before shell or paid tools
- YOLO: enables shell + trust + auto-approves all tools (dangerous)
- RLM: externalized context + REPL helpers; auto-approves tools (best for large files)
- Duo: player-coach autocoding with iterative validation (based on g3 paper)
Approval behavior is mode-dependent, but you can also override it at runtime with /set approval_mode auto|suggest|never.
Tools
MiniMax CLI exposes tools to the model: file read/write/patching, shell execution, web search, sub-agents, and MiniMax media APIs.
- Workspace boundary: file tools are restricted to
--workspaceunless you enable/trust(YOLO enables trust automatically). - Approvals: the TUI requests approval depending on mode and tool category (file writes, shell, paid media).
- Web search:
web_searchuses DuckDuckGo HTML results and is auto-approved. - Media tools: image/video/music/TTS tools make paid API calls and write real files.
- Skills: reusable workflows stored as
SKILL.mddirectories (default:~/.minimax/skills). Use/skillsand/skill <name>(this repo includes examples underskills/). - MCP: load external tool servers via
~/.minimax/mcp.json(supportsserversandmcpServers). MCP tools currently execute without TUI approval prompts, so only enable servers you trust. Seedocs/MCP.md.
RLM
RLM mode is designed for “too big for context” tasks: large files, whole-doc sweeps, and big pasted blocks.
- Auto-switch triggers: “largest file”, explicit “RLM”, large file requests, and large pastes.
- In RLM mode,
/load @pathloads a file into the external context store (outside RLM mode,/loadloads a saved chat JSON). - Use
/replto enter expression mode (e.g.search(\"pattern\"),lines(1, 80)). - Power tools:
rlm_load,rlm_exec,rlm_status,rlm_query.
rlm_query can be expensive: prefer batching and check /status if you're doing lots of sub-queries.
Duo Mode
Duo mode implements the player-coach autocoding paradigm for iterative development with built-in validation:
- Player: implements requirements (builder role)
- Coach: validates implementation against requirements (critic role)
- Tools:
duo_init,duo_player,duo_coach,duo_advance,duo_status
Workflow: init → player → coach → advance → (repeat until approved)
Examples
minimax # Interactive TUI
minimax -p "Write a haiku" # One-shot prompt (prints and exits)
minimax doctor # Diagnose config + API key
minimax sessions --limit 50 # List sessions (~/.minimax/sessions)
minimax --resume latest # Resume most recent session
minimax --resume <id-prefix> # Resume by ID/prefix
minimax --workspace /path/to/project
minimax --yolo # Start in YOLO mode (dangerous)
minimax init # Generate a starter AGENTS.md
Shell completions:
minimax completions zsh > _minimax
minimax completions bash > minimax.bash
minimax completions fish > minimax.fish
Run the paid media smoke test (writes real files and spends credits):
minimax --workspace . smoke-media --confirm
Troubleshooting
- No API key: set
MINIMAX_API_KEYor runminimaxand complete onboarding - Config not found: check
~/.minimax/config.toml(orMINIMAX_CONFIG_PATH) - Wrong region / base URL: set
MINIMAX_BASE_URLtohttps://api.minimaxi.com(China) - Session issues: run
minimax sessionsand tryminimax --resume latest - MCP tools missing: validate
~/.minimax/mcp.json(orMINIMAX_MCP_CONFIG) and restart
Documentation
docs/README.mddocs/CONFIGURATION.mddocs/MCP.mddocs/ARCHITECTURE.mdCONTRIBUTING.md
Development
cargo build
cargo test
cargo fmt
cargo clippy
License
MIT
MiniMax is a trademark of MiniMax Inc. This is an unofficial project.
Metadata
Release files for MiniMax-CLI 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| minimax_cli-0.6.0.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| minimax_cli-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.4 kB
Release files / minimax_cli-0.6.0.tar.gz
| Download URL | minimax_cli-0.6.0.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74b282923a26ed6e0cbd269fcf185a9f0475a4a9b4bfe38264654edfac63ec18
|
|
BLAKE2b-256 checksum How to use checksums |
8e34a5d612f1ceade30a7beb0d8891b279a9a2e2b7db0b73e10ba6a3e5f3efbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 8, 2026.
Transparency logRelease files / minimax_cli-0.6.0-py3-none-any.whl
| Download URL | minimax_cli-0.6.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc04aacf8423339ddcf57588ca68df3150558db720a980b0d5515a1117320c56
|
|
BLAKE2b-256 checksum How to use checksums |
bf2d8bc455d01e33958e3756c1ef741052732cea1b4282b65b101c585e29d615
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 8, 2026.
Transparency log