Official Unofficial MiniMax Platform CLI
Reason this release was yanked:
too early
Project description
MiniMax CLI
███╗ ███╗██╗███╗ ██╗██╗███╗ ███╗ █████╗ ██╗ ██╗
████╗ ████║██║████╗ ██║██║████╗ ████║██╔══██╗╚██╗██╔╝
██╔████╔██║██║██╔██╗ ██║██║██╔████╔██║███████║ ╚███╔╝
██║╚██╔╝██║██║██║╚██╗██║██║██║╚██╔╝██║██╔══██║ ██╔██╗
██║ ╚═╝ ██║██║██║ ╚████║██║██║ ╚═╝ ██║██║ ██║██╔╝ ██╗
╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝
Unofficial CLI for the MiniMax M2.1 API - Not affiliated with MiniMax Inc.
A powerful, feature-rich Rust CLI for interacting with MiniMax's M2.1 model via the Anthropic-compatible API. Supports text chat, agentic workflows, image/video/audio/music generation, and a Codex-like RLM sandbox mode.
Features
- Interactive TUI - Beautiful ratatui-based terminal UI with multiple modes
- Agent Mode - Autonomous task execution with built-in tools
- RLM Sandbox - Recursive Language Model REPL for large context processing
- Multi-Modal Generation - Text, image, video, audio, and music
- MCP Integration - Model Context Protocol server support
- Memory System - Persistent long-term memory across sessions
- Skills System - Extensible prompt augmentation
- Prompt Caching - Efficient token usage with cache controls
- Context Compaction - Auto-summarization for long conversations
Quick Start
# Install
cargo install --path .
# Configure
export MINIMAX_API_KEY=your_api_key_here
# Or create ~/.minimax/config.toml
# Interactive TUI (recommended)
minimax-cli tui
# Simple chat
minimax-cli text chat --prompt "Hello, MiniMax!"
# Agent mode with tools
minimax-cli agent run --allow-shell --prompt "List files in current directory"
# RLM sandbox for large files
minimax-cli rlm repl --load large_file.txt
Modes
Normal Mode (Chat)
Standard conversational interaction with the M2.1 model.
minimax-cli text chat
# Or in TUI: /mode normal
Agent Mode
Autonomous task execution with built-in tools:
list_dir- List directory contentsread_file- Read files from workspacewrite_file- Write files to workspaceedit_file- Search/replace in filesexec_shell- Execute shell commands (requires--allow-shell)note- Append to notes filemcp_call- Call MCP server tools
minimax-cli agent run --workspace ./project --allow-shell
# Or in TUI: /mode agent or /yolo (enables shell)
Plan Mode
Design-first workflow - plan your implementation before coding.
# In TUI: /mode plan
Edit Mode
File modification focus with AI assistance.
# In TUI: /mode edit
RLM Sandbox Mode
Recursive Language Model sandbox for processing large contexts. Based on the RLM paradigm that enables LMs to programmatically examine, decompose, and recursively process inputs of near-infinite length.
# Interactive REPL
minimax-cli rlm repl --load myfile.txt
# Command-line operations
minimax-cli rlm load --path myfile.txt --context-id main
minimax-cli rlm search --context-id main --pattern "TODO|FIXME"
minimax-cli rlm exec --context-id main --code "lines(0, 50)"
RLM Expressions:
len- Character countline_count- Line counthead/tail- First/last 10 linespeek(start, end)- Character slicelines(start, end)- Line rangesearch("pattern")- Regex searchchunk(size, overlap)- Split into chunks
Interactive TUI
The TUI provides a rich terminal interface with:
- MiniMax branded header with logo
- Mode indicator (Normal/Edit/Agent/Plan/RLM)
- Chat history with scrolling
- Status bar with keybindings
- Help popup (F1)
TUI Commands:
| Command | Description |
|---|---|
/mode <n/e/a/p/r> |
Switch modes |
/yolo |
Enable Agent + Shell |
/help |
Show help |
/clear |
Clear conversation |
/model <name> |
Change model |
/compact |
Toggle auto-compaction |
/save <path> |
Save session |
/load <path> |
Load session |
/exit |
Exit application |
Keybindings:
| Key | Action |
|---|---|
F1 |
Help |
Ctrl+C |
Exit |
Esc |
Clear input / Normal mode |
Alt+Up/Down |
Scroll chat |
PageUp/PageDown |
Fast scroll |
Up/Down |
History navigation |
Configuration
Create ~/.minimax/config.toml:
api_key = "YOUR_MINIMAX_API_KEY"
anthropic_api_key = "YOUR_ANTHROPIC_COMPAT_API_KEY"
base_url = "https://api.minimax.io"
anthropic_base_url = "https://api.minimax.io/anthropic"
default_text_model = "MiniMax-M2.1"
output_dir = "./outputs"
allow_shell = false
[retry]
enabled = true
max_retries = 3
[compaction]
enabled = false
token_threshold = 50000
message_threshold = 50
[rlm]
max_context_chars = 10000000
session_dir = "~/.minimax/rlm"
[profiles.work]
api_key = "WORK_API_KEY"
Environment Variables:
MINIMAX_API_KEY- API keyANTHROPIC_API_KEY- Anthropic-compatible API keyMINIMAX_BASE_URL- Base URLMINIMAX_PROFILE- Config profile nameMINIMAX_ALLOW_SHELL- Enable shell (true/false)
Media Generation
Images
minimax-cli image generate --prompt "A sunset over mountains"
Videos
minimax-cli video generate --prompt "A timelapse of clouds" --wait
minimax-cli video query --task-id <id>
Audio (TTS)
minimax-cli audio t2a --text "Hello, world!" --voice-id english-1
minimax-cli audio voice list
minimax-cli audio voice clone --clone-audio sample.wav
Music
minimax-cli music generate --prompt "Upbeat electronic track"
MCP Integration
Manage Model Context Protocol servers:
# List servers
minimax-cli mcp list
# Add server
minimax-cli mcp add --name myserver --command "python" --arg "-m" --arg "mcp_server"
# Remove server
minimax-cli mcp remove --name myserver
Use MCP tools in agent mode via the mcp_call tool.
Memory & Skills
Long-term Memory
minimax-cli memory show
minimax-cli memory add --content "Important fact to remember"
minimax-cli memory clear
Use --memory flag in agent/TUI to include memory in prompts.
Skills
Skills are prompt templates stored in ~/.minimax/skills/<name>/SKILL.md:
minimax-cli skills list
minimax-cli skills show --name coding
Load skills with --skill coding --skill writing in agent mode.
Prompt Caching
Optimize token usage with Anthropic-style prompt caching:
# Cache system prompt
minimax-cli text chat --cache-system
# Cache tools
minimax-cli text chat --cache-tools
# Cache user message
minimax-cli text chat --cache
# Agent with caching
minimax-cli agent run --cache-system --cache-tools --cache-memory
Context Compaction
Auto-summarize long conversations to stay within context limits:
# Enable in config.toml:
# [compaction]
# enabled = true
# token_threshold = 50000
# Or toggle in TUI:
# /compact
When enabled, older messages are summarized when the conversation exceeds thresholds.
File Management
minimax-cli files upload --path file.txt --purpose "assistants"
minimax-cli files list --purpose "assistants"
minimax-cli files retrieve --file-id <id>
minimax-cli files retrieve-content --file-id <id> --output local.txt
minimax-cli files delete --file-id <id>
Models Registry
minimax-cli models list
minimax-cli models list --json
Session Management
Save and restore chat/agent sessions:
# In TUI or agent mode:
/save session.json
/load session.json
/export session.md
Release
GitHub Release
- Update version in
Cargo.toml - Tag release:
git tag v0.1.0 && git push --tags - GitHub Actions builds and publishes
PyPI (Python wrapper)
cd python && uv build && uv publish
Crates.io
cargo publish
Architecture
src/
├── main.rs # CLI entry point (clap)
├── client.rs # HTTP clients (MiniMax, Anthropic)
├── config.rs # TOML config with profiles
├── models.rs # API data structures
├── agent.rs # Agentic tool loop
├── rlm.rs # RLM sandbox REPL
├── compaction.rs # Context auto-compaction
├── tui/ # Ratatui TUI
│ ├── app.rs # App state & modes
│ └── ui.rs # Rendering
├── modules/ # Media generation
│ ├── text.rs # Chat
│ ├── image.rs # Image gen
│ ├── video.rs # Video gen
│ ├── audio.rs # TTS
│ └── music.rs # Music gen
├── mcp.rs # MCP integration
├── skills.rs # Skills system
├── memory.rs # Long-term memory
└── session.rs # Session save/load
Requirements
- Rust 1.89+ (edition 2024)
- MiniMax API key
- macOS/Linux (Windows untested)
License
MIT
This is an unofficial, community-maintained project. MiniMax and the MiniMax logo are trademarks of MiniMax Inc.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file minimax_cli-0.1.2.tar.gz.
File metadata
- Download URL: minimax_cli-0.1.2.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70a1360ddc0e473064ce14a9e28d596281ecd291f2349f8169683421a7bbe733
|
|
| MD5 |
4649b2bf5477a951749bcf17b1da3ce3
|
|
| BLAKE2b-256 |
7a8f403d857e3faa0172d5fef00ceea08f17f8d4805c62d63fba0bd3df349da7
|
Provenance
The following attestation bundles were made for minimax_cli-0.1.2.tar.gz:
Publisher:
publish.yml on Hmbown/MiniMax-CLI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
minimax_cli-0.1.2.tar.gz -
Subject digest:
70a1360ddc0e473064ce14a9e28d596281ecd291f2349f8169683421a7bbe733 - Sigstore transparency entry: 813470134
- Sigstore integration time:
-
Permalink:
Hmbown/MiniMax-CLI@692e76b94b563b7dde236e905182056b391e6154 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Hmbown
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@692e76b94b563b7dde236e905182056b391e6154 -
Trigger Event:
push
-
Statement type:
File details
Details for the file minimax_cli-0.1.2-py3-none-any.whl.
File metadata
- Download URL: minimax_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a7b488a814800beaa1316d5b5948ef2d922ff0ae05cea9888af822120928957
|
|
| MD5 |
812eec0a7b58c43902bdfa45176c5d3d
|
|
| BLAKE2b-256 |
eee8c2d4bb2c2ae47ea1503e46a166930279405659598aac8421a3322074d364
|
Provenance
The following attestation bundles were made for minimax_cli-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on Hmbown/MiniMax-CLI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
minimax_cli-0.1.2-py3-none-any.whl -
Subject digest:
6a7b488a814800beaa1316d5b5948ef2d922ff0ae05cea9888af822120928957 - Sigstore transparency entry: 813470139
- Sigstore integration time:
-
Permalink:
Hmbown/MiniMax-CLI@692e76b94b563b7dde236e905182056b391e6154 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Hmbown
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@692e76b94b563b7dde236e905182056b391e6154 -
Trigger Event:
push
-
Statement type: