| Crates.io | minimax-cli |
| lib.rs | minimax-cli |
| version | 0.3.0 |
| created_at | 2026-01-13 07:08:00.490992+00 |
| updated_at | 2026-01-25 23:03:18.308724+00 |
| description | Unofficial MiniMax M2.1 CLI - Just run 'minimax' to start chatting |
| homepage | |
| repository | https://github.com/Hmbown/MiniMax-CLI |
| max_upload_size | |
| id | 2039519 |
| size | 1,545,056 |
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.
npm install -g @hmbown/minimax-cli
export MINIMAX_API_KEY="YOUR_MINIMAX_API_KEY"
minimax
F1 or run /help for the in-app command listminimax doctorThe npm package is a thin wrapper that downloads the platform-appropriate Rust binary from GitHub Releases.
# installs `minimax`
npm install -g @hmbown/minimax-cli
bun install -g @hmbown/minimax-cli
cargo install minimax-cli --locked
git clone https://github.com/Hmbown/MiniMax-CLI.git
cd MiniMax-CLI
cargo build --release
./target/release/minimax --help
Download a prebuilt binary from https://github.com/Hmbown/MiniMax-CLI/releases and put it on your PATH as minimax.
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 (overrides api_key)MINIMAX_BASE_URL (default: https://api.minimax.io; China users may use https://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_SUBAGENTSSee config.example.toml and docs/CONFIGURATION.md for a full reference.
In the TUI, press Tab to cycle modes: Normal → Plan → Agent → YOLO → RLM → Duo → Normal.
Approval behavior is mode-dependent, but you can also override it at runtime with /set approval_mode auto|suggest|never.
MiniMax CLI exposes tools to the model: file read/write/patching, shell execution, web search, sub-agents, and MiniMax media APIs.
--workspace unless you enable /trust (YOLO enables trust automatically).web_search uses DuckDuckGo HTML results and is auto-approved.SKILL.md directories (default: ~/.minimax/skills). Use /skills and /skill <name> (this repo includes examples under skills/).~/.minimax/mcp.json (supports servers and mcpServers). MCP tools currently execute without TUI approval prompts, so only enable servers you trust. See docs/MCP.md.RLM mode is designed for “too big for context” tasks: large files, whole-doc sweeps, and big pasted blocks.
/load @path loads a file into the external context store (outside RLM mode, /load loads a saved chat JSON)./repl to enter expression mode (e.g. search(\"pattern\"), lines(1, 80)).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 implements the player-coach autocoding paradigm for iterative development with built-in validation:
duo_init, duo_player, duo_coach, duo_advance, duo_statusWorkflow: init → player → coach → advance → (repeat until approved)
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
MINIMAX_API_KEY or run minimax and complete onboarding~/.minimax/config.toml (or MINIMAX_CONFIG_PATH)MINIMAX_BASE_URL to https://api.minimaxi.com (China)minimax sessions and try minimax --resume latest~/.minimax/mcp.json (or MINIMAX_MCP_CONFIG) and restartdocs/README.mddocs/CONFIGURATION.mddocs/MCP.mddocs/ARCHITECTURE.mdCONTRIBUTING.mdcargo build
cargo test
cargo fmt
cargo clippy
MIT
MiniMax is a trademark of MiniMax Inc. This is an unofficial project.