MiniMax-CLI 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of MiniMax-CLI might be problematic. Click here for more details.

@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2025 MiniMax CLI Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,216 @@
1
+ Metadata-Version: 2.4
2
+ Name: MiniMax-CLI
3
+ Version: 0.1.3
4
+ Summary: Unofficial MiniMax CLI - downloads and runs the Rust binary
5
+ Author: Hmbown
6
+ Project-URL: Homepage, https://github.com/Hmbown/MiniMax-CLI
7
+ Project-URL: Source, https://github.com/Hmbown/MiniMax-CLI
8
+ Keywords: minimax,cli,ai,agent
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.8
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Dynamic: license-file
17
+
18
+ # MiniMax CLI
19
+
20
+ ![CI](https://github.com/Hmbown/MiniMax-CLI/actions/workflows/ci.yml/badge.svg)
21
+ ![crates.io](https://img.shields.io/crates/v/minimax-cli)
22
+ ![npm](https://img.shields.io/npm/v/@hmbown/minimax-cli)
23
+ ![PyPI](https://img.shields.io/pypi/v/MiniMax-CLI)
24
+
25
+ Unofficial terminal UI (TUI) + CLI for the [MiniMax platform](https://platform.minimax.io): chat with **MiniMax-M2.1**, run an approval-gated tool-using agent, and generate media (images, video, music, TTS).
26
+
27
+ Highlights:
28
+
29
+ - Streaming chat via MiniMax’s Anthropic-compatible API format
30
+ - Tool-using agent with approvals + workspace sandbox
31
+ - Built-in MiniMax media tools (image/video/music/TTS/voice) that save outputs to your workspace
32
+ - Skills (`SKILL.md`) and external tools via MCP
33
+ - Project-aware prompts via `AGENTS.md` (and `.claude/instructions.md` / `CLAUDE.md`)
34
+
35
+ Not affiliated with MiniMax Inc.
36
+
37
+ ## Quickstart
38
+
39
+ 1. Get an API key from https://platform.minimax.io
40
+ 2. Run `minimax` (or `minimax-cli` if you installed via pip) and paste your key when prompted (saved to `~/.minimax/config.toml`), or set `MINIMAX_API_KEY`
41
+ 3. Press `F1` or run `/help` for the in-app command list
42
+
43
+ ## Install
44
+
45
+ ### Prebuilt (recommended)
46
+
47
+ NPM and Python packages are thin wrappers that download the platform-appropriate Rust binary from GitHub Releases.
48
+
49
+ ```bash
50
+ # npm / bun (installs `minimax`)
51
+ npm install -g @hmbown/minimax-cli
52
+ bun install -g @hmbown/minimax-cli
53
+
54
+ # pip / uv (installs `minimax-cli`)
55
+ pip install MiniMax-CLI
56
+ uv pip install MiniMax-CLI
57
+ ```
58
+
59
+ ### From source (Rust)
60
+
61
+ ```bash
62
+ cargo install minimax-cli
63
+ ```
64
+
65
+ ### Direct download
66
+
67
+ Download a prebuilt binary from https://github.com/Hmbown/MiniMax-CLI/releases and put it on your `PATH` as `minimax`.
68
+
69
+ ## Usage
70
+
71
+ ```bash
72
+ minimax # Interactive TUI
73
+ minimax -p "Write a haiku" # One-shot prompt (prints and exits)
74
+
75
+ minimax doctor # Diagnose config + API key
76
+ minimax sessions # List auto-saved sessions (~/.minimax/sessions)
77
+ minimax --resume <id> # Resume by ID/prefix (or "latest")
78
+ minimax --continue # Resume most recent session
79
+
80
+ minimax --workspace /path/to/project
81
+ minimax --yolo # Start in Agent mode + auto-approve tools (dangerous)
82
+
83
+ minimax init # Generate a starter AGENTS.md for the current directory
84
+ ```
85
+
86
+ If you installed via pip, run the same commands as `minimax-cli ...` (it downloads the `minimax` binary and then execs it).
87
+
88
+ Shell completions:
89
+
90
+ ```bash
91
+ minimax completions zsh > _minimax
92
+ minimax completions bash > minimax.bash
93
+ minimax completions fish > minimax.fish
94
+ ```
95
+
96
+ ## Configuration
97
+
98
+ The TUI can save your API key during onboarding. You can also create `~/.minimax/config.toml` manually.
99
+
100
+ Minimal config:
101
+
102
+ ```toml
103
+ api_key = "YOUR_MINIMAX_API_KEY"
104
+ default_text_model = "MiniMax-M2.1" # optional
105
+ allow_shell = false # optional
106
+ max_subagents = 3 # optional (1-5)
107
+ ```
108
+
109
+ Useful environment variables:
110
+
111
+ - `MINIMAX_API_KEY` (overrides config)
112
+ - `MINIMAX_BASE_URL` (default: `https://api.minimax.io`; China users may use `https://api.minimaxi.com`)
113
+ - `MINIMAX_PROFILE` (selects `[profiles.<name>]` from config)
114
+ - `MINIMAX_CONFIG_PATH` (override config file path)
115
+ - `MINIMAX_ALLOW_SHELL`, `MINIMAX_SKILLS_DIR`, `MINIMAX_MCP_CONFIG`, `MINIMAX_NOTES_PATH`
116
+
117
+ See `config.example.toml` for a fuller config reference.
118
+
119
+ ## Project Instructions (AGENTS.md)
120
+
121
+ If your workspace has an `AGENTS.md`, the TUI loads it into the system prompt automatically (and will also look in parent directories up to the git root). Use it to tell the agent how to work in your repo: commands, conventions, and guardrails.
122
+
123
+ Create a starter file:
124
+
125
+ - CLI: `minimax init`
126
+ - In-app: `/init`
127
+
128
+ ## What You Can Do In The TUI
129
+
130
+ ### Modes
131
+
132
+ Switch modes with `Tab` or `/mode`:
133
+
134
+ - **Normal**: chat
135
+ - **Edit**: file-focused assistance
136
+ - **Agent**: multi-step tool use (with approvals)
137
+ - **Plan**: design-first prompting
138
+ - **RLM**: load/search/chunk large files in an in-app sandbox
139
+
140
+ ### Slash Commands (high-signal)
141
+
142
+ The built-in help (`F1` or `/help`) is always up to date. Common commands:
143
+
144
+ | Command | What it does |
145
+ |---|---|
146
+ | `/mode [normal|edit|agent|plan|rlm]` | Switch modes |
147
+ | `/model [name]` | View/set model name |
148
+ | `/skills` | List skills |
149
+ | `/skill <name>` | Activate a skill for your next message |
150
+ | `/save [path]` | Save current chat to JSON |
151
+ | `/load <path>` | Load chat JSON (or load a file into RLM context in RLM mode) |
152
+ | `/export [path]` | Export transcript to Markdown |
153
+ | `/yolo` | Switch to Agent mode + enable shell tool (still prompts for approval) |
154
+ | `/trust` | Allow file access outside workspace |
155
+ | `/tokens` | Token totals + metadata |
156
+ | `/context` | Context usage estimate |
157
+ | `/cost` | Pricing reference for paid tools |
158
+ | `/subagents` | Show sub-agent status |
159
+
160
+ ## Tools, Safety, And The Workspace Boundary
161
+
162
+ MiniMax CLI exposes a tool set to the model (file read/write, patching, web search, sub-agents, and MiniMax media APIs). By default, the TUI asks before running tools with side effects:
163
+
164
+ - **File writes**: `write_file`, `edit_file`, `apply_patch`
165
+ - **Shell**: `exec_shell` (disabled unless `allow_shell=true` or `/yolo` or `--yolo`)
166
+ - **Paid/Media**: `generate_image`, `generate_video`, `generate_music`, `tts`, voice tools, file upload/download
167
+
168
+ The built-in `web_search` tool is backed by DuckDuckGo HTML results and is auto-approved.
169
+
170
+ File tools are restricted to the `--workspace` directory unless you enable `/trust`.
171
+
172
+ ## Media Generation (MiniMax APIs)
173
+
174
+ MiniMax CLI includes first-class tools for MiniMax’s media endpoints. In practice: ask for an image/video/music/TTS and the assistant can generate it and save outputs into your workspace.
175
+
176
+ Built-in MiniMax tool names (for power users): `generate_image`, `generate_video`, `query_video`, `generate_music`, `tts`, `analyze_image`, `voice_clone`, `voice_list`, `voice_delete`, `voice_design`.
177
+
178
+ ## Skills
179
+
180
+ Skills are reusable workflows stored as `SKILL.md` files inside a directory.
181
+
182
+ - If your workspace contains `./skills/`, the TUI uses that.
183
+ - Otherwise, it falls back to `~/.minimax/skills/`.
184
+
185
+ Use `/skills` to list and `/skill <name>` to activate.
186
+
187
+ This repo includes example skills like `video-studio`, `voiceover-studio`, `music-video-generator`, and `audiobook-studio` under `skills/`.
188
+
189
+ ## MCP (External Tool Servers)
190
+
191
+ MiniMax CLI can load additional tools via MCP (Model Context Protocol). Configure `~/.minimax/mcp.json` (supports `servers` and `mcpServers` keys), then restart the TUI.
192
+
193
+ For Coding Plan MCP setup, see `docs/coding-plan-integration.md`.
194
+
195
+ ## Documentation
196
+
197
+ - `docs/ARCHITECTURE.md`
198
+ - `docs/coding-plan-integration.md`
199
+ - `CONTRIBUTING.md`
200
+
201
+ ## Development
202
+
203
+ ```bash
204
+ cargo build
205
+ cargo test
206
+ cargo fmt
207
+ cargo clippy
208
+ ```
209
+
210
+ ## License
211
+
212
+ MIT
213
+
214
+ ---
215
+
216
+ MiniMax is a trademark of MiniMax Inc. This is an unofficial project.
@@ -0,0 +1,199 @@
1
+ # MiniMax CLI
2
+
3
+ ![CI](https://github.com/Hmbown/MiniMax-CLI/actions/workflows/ci.yml/badge.svg)
4
+ ![crates.io](https://img.shields.io/crates/v/minimax-cli)
5
+ ![npm](https://img.shields.io/npm/v/@hmbown/minimax-cli)
6
+ ![PyPI](https://img.shields.io/pypi/v/MiniMax-CLI)
7
+
8
+ Unofficial terminal UI (TUI) + CLI for the [MiniMax platform](https://platform.minimax.io): chat with **MiniMax-M2.1**, run an approval-gated tool-using agent, and generate media (images, video, music, TTS).
9
+
10
+ Highlights:
11
+
12
+ - Streaming chat via MiniMax’s Anthropic-compatible API format
13
+ - Tool-using agent with approvals + workspace sandbox
14
+ - Built-in MiniMax media tools (image/video/music/TTS/voice) that save outputs to your workspace
15
+ - Skills (`SKILL.md`) and external tools via MCP
16
+ - Project-aware prompts via `AGENTS.md` (and `.claude/instructions.md` / `CLAUDE.md`)
17
+
18
+ Not affiliated with MiniMax Inc.
19
+
20
+ ## Quickstart
21
+
22
+ 1. Get an API key from https://platform.minimax.io
23
+ 2. Run `minimax` (or `minimax-cli` if you installed via pip) and paste your key when prompted (saved to `~/.minimax/config.toml`), or set `MINIMAX_API_KEY`
24
+ 3. Press `F1` or run `/help` for the in-app command list
25
+
26
+ ## Install
27
+
28
+ ### Prebuilt (recommended)
29
+
30
+ NPM and Python packages are thin wrappers that download the platform-appropriate Rust binary from GitHub Releases.
31
+
32
+ ```bash
33
+ # npm / bun (installs `minimax`)
34
+ npm install -g @hmbown/minimax-cli
35
+ bun install -g @hmbown/minimax-cli
36
+
37
+ # pip / uv (installs `minimax-cli`)
38
+ pip install MiniMax-CLI
39
+ uv pip install MiniMax-CLI
40
+ ```
41
+
42
+ ### From source (Rust)
43
+
44
+ ```bash
45
+ cargo install minimax-cli
46
+ ```
47
+
48
+ ### Direct download
49
+
50
+ Download a prebuilt binary from https://github.com/Hmbown/MiniMax-CLI/releases and put it on your `PATH` as `minimax`.
51
+
52
+ ## Usage
53
+
54
+ ```bash
55
+ minimax # Interactive TUI
56
+ minimax -p "Write a haiku" # One-shot prompt (prints and exits)
57
+
58
+ minimax doctor # Diagnose config + API key
59
+ minimax sessions # List auto-saved sessions (~/.minimax/sessions)
60
+ minimax --resume <id> # Resume by ID/prefix (or "latest")
61
+ minimax --continue # Resume most recent session
62
+
63
+ minimax --workspace /path/to/project
64
+ minimax --yolo # Start in Agent mode + auto-approve tools (dangerous)
65
+
66
+ minimax init # Generate a starter AGENTS.md for the current directory
67
+ ```
68
+
69
+ If you installed via pip, run the same commands as `minimax-cli ...` (it downloads the `minimax` binary and then execs it).
70
+
71
+ Shell completions:
72
+
73
+ ```bash
74
+ minimax completions zsh > _minimax
75
+ minimax completions bash > minimax.bash
76
+ minimax completions fish > minimax.fish
77
+ ```
78
+
79
+ ## Configuration
80
+
81
+ The TUI can save your API key during onboarding. You can also create `~/.minimax/config.toml` manually.
82
+
83
+ Minimal config:
84
+
85
+ ```toml
86
+ api_key = "YOUR_MINIMAX_API_KEY"
87
+ default_text_model = "MiniMax-M2.1" # optional
88
+ allow_shell = false # optional
89
+ max_subagents = 3 # optional (1-5)
90
+ ```
91
+
92
+ Useful environment variables:
93
+
94
+ - `MINIMAX_API_KEY` (overrides config)
95
+ - `MINIMAX_BASE_URL` (default: `https://api.minimax.io`; China users may use `https://api.minimaxi.com`)
96
+ - `MINIMAX_PROFILE` (selects `[profiles.<name>]` from config)
97
+ - `MINIMAX_CONFIG_PATH` (override config file path)
98
+ - `MINIMAX_ALLOW_SHELL`, `MINIMAX_SKILLS_DIR`, `MINIMAX_MCP_CONFIG`, `MINIMAX_NOTES_PATH`
99
+
100
+ See `config.example.toml` for a fuller config reference.
101
+
102
+ ## Project Instructions (AGENTS.md)
103
+
104
+ If your workspace has an `AGENTS.md`, the TUI loads it into the system prompt automatically (and will also look in parent directories up to the git root). Use it to tell the agent how to work in your repo: commands, conventions, and guardrails.
105
+
106
+ Create a starter file:
107
+
108
+ - CLI: `minimax init`
109
+ - In-app: `/init`
110
+
111
+ ## What You Can Do In The TUI
112
+
113
+ ### Modes
114
+
115
+ Switch modes with `Tab` or `/mode`:
116
+
117
+ - **Normal**: chat
118
+ - **Edit**: file-focused assistance
119
+ - **Agent**: multi-step tool use (with approvals)
120
+ - **Plan**: design-first prompting
121
+ - **RLM**: load/search/chunk large files in an in-app sandbox
122
+
123
+ ### Slash Commands (high-signal)
124
+
125
+ The built-in help (`F1` or `/help`) is always up to date. Common commands:
126
+
127
+ | Command | What it does |
128
+ |---|---|
129
+ | `/mode [normal|edit|agent|plan|rlm]` | Switch modes |
130
+ | `/model [name]` | View/set model name |
131
+ | `/skills` | List skills |
132
+ | `/skill <name>` | Activate a skill for your next message |
133
+ | `/save [path]` | Save current chat to JSON |
134
+ | `/load <path>` | Load chat JSON (or load a file into RLM context in RLM mode) |
135
+ | `/export [path]` | Export transcript to Markdown |
136
+ | `/yolo` | Switch to Agent mode + enable shell tool (still prompts for approval) |
137
+ | `/trust` | Allow file access outside workspace |
138
+ | `/tokens` | Token totals + metadata |
139
+ | `/context` | Context usage estimate |
140
+ | `/cost` | Pricing reference for paid tools |
141
+ | `/subagents` | Show sub-agent status |
142
+
143
+ ## Tools, Safety, And The Workspace Boundary
144
+
145
+ MiniMax CLI exposes a tool set to the model (file read/write, patching, web search, sub-agents, and MiniMax media APIs). By default, the TUI asks before running tools with side effects:
146
+
147
+ - **File writes**: `write_file`, `edit_file`, `apply_patch`
148
+ - **Shell**: `exec_shell` (disabled unless `allow_shell=true` or `/yolo` or `--yolo`)
149
+ - **Paid/Media**: `generate_image`, `generate_video`, `generate_music`, `tts`, voice tools, file upload/download
150
+
151
+ The built-in `web_search` tool is backed by DuckDuckGo HTML results and is auto-approved.
152
+
153
+ File tools are restricted to the `--workspace` directory unless you enable `/trust`.
154
+
155
+ ## Media Generation (MiniMax APIs)
156
+
157
+ MiniMax CLI includes first-class tools for MiniMax’s media endpoints. In practice: ask for an image/video/music/TTS and the assistant can generate it and save outputs into your workspace.
158
+
159
+ Built-in MiniMax tool names (for power users): `generate_image`, `generate_video`, `query_video`, `generate_music`, `tts`, `analyze_image`, `voice_clone`, `voice_list`, `voice_delete`, `voice_design`.
160
+
161
+ ## Skills
162
+
163
+ Skills are reusable workflows stored as `SKILL.md` files inside a directory.
164
+
165
+ - If your workspace contains `./skills/`, the TUI uses that.
166
+ - Otherwise, it falls back to `~/.minimax/skills/`.
167
+
168
+ Use `/skills` to list and `/skill <name>` to activate.
169
+
170
+ This repo includes example skills like `video-studio`, `voiceover-studio`, `music-video-generator`, and `audiobook-studio` under `skills/`.
171
+
172
+ ## MCP (External Tool Servers)
173
+
174
+ MiniMax CLI can load additional tools via MCP (Model Context Protocol). Configure `~/.minimax/mcp.json` (supports `servers` and `mcpServers` keys), then restart the TUI.
175
+
176
+ For Coding Plan MCP setup, see `docs/coding-plan-integration.md`.
177
+
178
+ ## Documentation
179
+
180
+ - `docs/ARCHITECTURE.md`
181
+ - `docs/coding-plan-integration.md`
182
+ - `CONTRIBUTING.md`
183
+
184
+ ## Development
185
+
186
+ ```bash
187
+ cargo build
188
+ cargo test
189
+ cargo fmt
190
+ cargo clippy
191
+ ```
192
+
193
+ ## License
194
+
195
+ MIT
196
+
197
+ ---
198
+
199
+ MiniMax is a trademark of MiniMax Inc. This is an unofficial project.
@@ -0,0 +1,31 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "MiniMax-CLI"
7
+ version = "0.1.3"
8
+ description = "Unofficial MiniMax CLI - downloads and runs the Rust binary"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ authors = [{ name = "Hmbown" }]
12
+ keywords = ["minimax", "cli", "ai", "agent"]
13
+ classifiers = [
14
+ "Development Status :: 3 - Alpha",
15
+ "Programming Language :: Python :: 3",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent",
18
+ ]
19
+
20
+ [project.urls]
21
+ Homepage = "https://github.com/Hmbown/MiniMax-CLI"
22
+ Source = "https://github.com/Hmbown/MiniMax-CLI"
23
+
24
+ [project.scripts]
25
+ minimax-cli = "minimax_cli.cli:main"
26
+
27
+ [tool.setuptools.package-dir]
28
+ "" = "python"
29
+
30
+ [tool.setuptools.packages.find]
31
+ where = ["python"]
@@ -0,0 +1,216 @@
1
+ Metadata-Version: 2.4
2
+ Name: MiniMax-CLI
3
+ Version: 0.1.3
4
+ Summary: Unofficial MiniMax CLI - downloads and runs the Rust binary
5
+ Author: Hmbown
6
+ Project-URL: Homepage, https://github.com/Hmbown/MiniMax-CLI
7
+ Project-URL: Source, https://github.com/Hmbown/MiniMax-CLI
8
+ Keywords: minimax,cli,ai,agent
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.8
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Dynamic: license-file
17
+
18
+ # MiniMax CLI
19
+
20
+ ![CI](https://github.com/Hmbown/MiniMax-CLI/actions/workflows/ci.yml/badge.svg)
21
+ ![crates.io](https://img.shields.io/crates/v/minimax-cli)
22
+ ![npm](https://img.shields.io/npm/v/@hmbown/minimax-cli)
23
+ ![PyPI](https://img.shields.io/pypi/v/MiniMax-CLI)
24
+
25
+ Unofficial terminal UI (TUI) + CLI for the [MiniMax platform](https://platform.minimax.io): chat with **MiniMax-M2.1**, run an approval-gated tool-using agent, and generate media (images, video, music, TTS).
26
+
27
+ Highlights:
28
+
29
+ - Streaming chat via MiniMax’s Anthropic-compatible API format
30
+ - Tool-using agent with approvals + workspace sandbox
31
+ - Built-in MiniMax media tools (image/video/music/TTS/voice) that save outputs to your workspace
32
+ - Skills (`SKILL.md`) and external tools via MCP
33
+ - Project-aware prompts via `AGENTS.md` (and `.claude/instructions.md` / `CLAUDE.md`)
34
+
35
+ Not affiliated with MiniMax Inc.
36
+
37
+ ## Quickstart
38
+
39
+ 1. Get an API key from https://platform.minimax.io
40
+ 2. Run `minimax` (or `minimax-cli` if you installed via pip) and paste your key when prompted (saved to `~/.minimax/config.toml`), or set `MINIMAX_API_KEY`
41
+ 3. Press `F1` or run `/help` for the in-app command list
42
+
43
+ ## Install
44
+
45
+ ### Prebuilt (recommended)
46
+
47
+ NPM and Python packages are thin wrappers that download the platform-appropriate Rust binary from GitHub Releases.
48
+
49
+ ```bash
50
+ # npm / bun (installs `minimax`)
51
+ npm install -g @hmbown/minimax-cli
52
+ bun install -g @hmbown/minimax-cli
53
+
54
+ # pip / uv (installs `minimax-cli`)
55
+ pip install MiniMax-CLI
56
+ uv pip install MiniMax-CLI
57
+ ```
58
+
59
+ ### From source (Rust)
60
+
61
+ ```bash
62
+ cargo install minimax-cli
63
+ ```
64
+
65
+ ### Direct download
66
+
67
+ Download a prebuilt binary from https://github.com/Hmbown/MiniMax-CLI/releases and put it on your `PATH` as `minimax`.
68
+
69
+ ## Usage
70
+
71
+ ```bash
72
+ minimax # Interactive TUI
73
+ minimax -p "Write a haiku" # One-shot prompt (prints and exits)
74
+
75
+ minimax doctor # Diagnose config + API key
76
+ minimax sessions # List auto-saved sessions (~/.minimax/sessions)
77
+ minimax --resume <id> # Resume by ID/prefix (or "latest")
78
+ minimax --continue # Resume most recent session
79
+
80
+ minimax --workspace /path/to/project
81
+ minimax --yolo # Start in Agent mode + auto-approve tools (dangerous)
82
+
83
+ minimax init # Generate a starter AGENTS.md for the current directory
84
+ ```
85
+
86
+ If you installed via pip, run the same commands as `minimax-cli ...` (it downloads the `minimax` binary and then execs it).
87
+
88
+ Shell completions:
89
+
90
+ ```bash
91
+ minimax completions zsh > _minimax
92
+ minimax completions bash > minimax.bash
93
+ minimax completions fish > minimax.fish
94
+ ```
95
+
96
+ ## Configuration
97
+
98
+ The TUI can save your API key during onboarding. You can also create `~/.minimax/config.toml` manually.
99
+
100
+ Minimal config:
101
+
102
+ ```toml
103
+ api_key = "YOUR_MINIMAX_API_KEY"
104
+ default_text_model = "MiniMax-M2.1" # optional
105
+ allow_shell = false # optional
106
+ max_subagents = 3 # optional (1-5)
107
+ ```
108
+
109
+ Useful environment variables:
110
+
111
+ - `MINIMAX_API_KEY` (overrides config)
112
+ - `MINIMAX_BASE_URL` (default: `https://api.minimax.io`; China users may use `https://api.minimaxi.com`)
113
+ - `MINIMAX_PROFILE` (selects `[profiles.<name>]` from config)
114
+ - `MINIMAX_CONFIG_PATH` (override config file path)
115
+ - `MINIMAX_ALLOW_SHELL`, `MINIMAX_SKILLS_DIR`, `MINIMAX_MCP_CONFIG`, `MINIMAX_NOTES_PATH`
116
+
117
+ See `config.example.toml` for a fuller config reference.
118
+
119
+ ## Project Instructions (AGENTS.md)
120
+
121
+ If your workspace has an `AGENTS.md`, the TUI loads it into the system prompt automatically (and will also look in parent directories up to the git root). Use it to tell the agent how to work in your repo: commands, conventions, and guardrails.
122
+
123
+ Create a starter file:
124
+
125
+ - CLI: `minimax init`
126
+ - In-app: `/init`
127
+
128
+ ## What You Can Do In The TUI
129
+
130
+ ### Modes
131
+
132
+ Switch modes with `Tab` or `/mode`:
133
+
134
+ - **Normal**: chat
135
+ - **Edit**: file-focused assistance
136
+ - **Agent**: multi-step tool use (with approvals)
137
+ - **Plan**: design-first prompting
138
+ - **RLM**: load/search/chunk large files in an in-app sandbox
139
+
140
+ ### Slash Commands (high-signal)
141
+
142
+ The built-in help (`F1` or `/help`) is always up to date. Common commands:
143
+
144
+ | Command | What it does |
145
+ |---|---|
146
+ | `/mode [normal|edit|agent|plan|rlm]` | Switch modes |
147
+ | `/model [name]` | View/set model name |
148
+ | `/skills` | List skills |
149
+ | `/skill <name>` | Activate a skill for your next message |
150
+ | `/save [path]` | Save current chat to JSON |
151
+ | `/load <path>` | Load chat JSON (or load a file into RLM context in RLM mode) |
152
+ | `/export [path]` | Export transcript to Markdown |
153
+ | `/yolo` | Switch to Agent mode + enable shell tool (still prompts for approval) |
154
+ | `/trust` | Allow file access outside workspace |
155
+ | `/tokens` | Token totals + metadata |
156
+ | `/context` | Context usage estimate |
157
+ | `/cost` | Pricing reference for paid tools |
158
+ | `/subagents` | Show sub-agent status |
159
+
160
+ ## Tools, Safety, And The Workspace Boundary
161
+
162
+ MiniMax CLI exposes a tool set to the model (file read/write, patching, web search, sub-agents, and MiniMax media APIs). By default, the TUI asks before running tools with side effects:
163
+
164
+ - **File writes**: `write_file`, `edit_file`, `apply_patch`
165
+ - **Shell**: `exec_shell` (disabled unless `allow_shell=true` or `/yolo` or `--yolo`)
166
+ - **Paid/Media**: `generate_image`, `generate_video`, `generate_music`, `tts`, voice tools, file upload/download
167
+
168
+ The built-in `web_search` tool is backed by DuckDuckGo HTML results and is auto-approved.
169
+
170
+ File tools are restricted to the `--workspace` directory unless you enable `/trust`.
171
+
172
+ ## Media Generation (MiniMax APIs)
173
+
174
+ MiniMax CLI includes first-class tools for MiniMax’s media endpoints. In practice: ask for an image/video/music/TTS and the assistant can generate it and save outputs into your workspace.
175
+
176
+ Built-in MiniMax tool names (for power users): `generate_image`, `generate_video`, `query_video`, `generate_music`, `tts`, `analyze_image`, `voice_clone`, `voice_list`, `voice_delete`, `voice_design`.
177
+
178
+ ## Skills
179
+
180
+ Skills are reusable workflows stored as `SKILL.md` files inside a directory.
181
+
182
+ - If your workspace contains `./skills/`, the TUI uses that.
183
+ - Otherwise, it falls back to `~/.minimax/skills/`.
184
+
185
+ Use `/skills` to list and `/skill <name>` to activate.
186
+
187
+ This repo includes example skills like `video-studio`, `voiceover-studio`, `music-video-generator`, and `audiobook-studio` under `skills/`.
188
+
189
+ ## MCP (External Tool Servers)
190
+
191
+ MiniMax CLI can load additional tools via MCP (Model Context Protocol). Configure `~/.minimax/mcp.json` (supports `servers` and `mcpServers` keys), then restart the TUI.
192
+
193
+ For Coding Plan MCP setup, see `docs/coding-plan-integration.md`.
194
+
195
+ ## Documentation
196
+
197
+ - `docs/ARCHITECTURE.md`
198
+ - `docs/coding-plan-integration.md`
199
+ - `CONTRIBUTING.md`
200
+
201
+ ## Development
202
+
203
+ ```bash
204
+ cargo build
205
+ cargo test
206
+ cargo fmt
207
+ cargo clippy
208
+ ```
209
+
210
+ ## License
211
+
212
+ MIT
213
+
214
+ ---
215
+
216
+ MiniMax is a trademark of MiniMax Inc. This is an unofficial project.
@@ -0,0 +1,10 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ python/MiniMax_CLI.egg-info/PKG-INFO
5
+ python/MiniMax_CLI.egg-info/SOURCES.txt
6
+ python/MiniMax_CLI.egg-info/dependency_links.txt
7
+ python/MiniMax_CLI.egg-info/entry_points.txt
8
+ python/MiniMax_CLI.egg-info/top_level.txt
9
+ python/minimax_cli/__init__.py
10
+ python/minimax_cli/cli.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ minimax-cli = minimax_cli.cli:main
@@ -0,0 +1 @@
1
+ minimax_cli
@@ -0,0 +1,34 @@
1
+ from importlib.metadata import PackageNotFoundError, version
2
+ from pathlib import Path
3
+ from typing import Optional
4
+ import re
5
+
6
+ __all__ = ["__version__"]
7
+
8
+
9
+ def _version_from_metadata() -> Optional[str]:
10
+ for dist_name in ("MiniMax-CLI", "minimax-cli", "MiniMax_CLI"):
11
+ try:
12
+ return version(dist_name)
13
+ except PackageNotFoundError:
14
+ continue
15
+ return None
16
+
17
+
18
+ def _version_from_pyproject() -> Optional[str]:
19
+ this_file = Path(__file__).resolve()
20
+ for parent in list(this_file.parents)[:6]:
21
+ candidate = parent / "pyproject.toml"
22
+ if not candidate.exists():
23
+ continue
24
+ try:
25
+ contents = candidate.read_text(encoding="utf-8")
26
+ except OSError:
27
+ continue
28
+ match = re.search(r'(?m)^version\\s*=\\s*"([^"]+)"\\s*$', contents)
29
+ if match:
30
+ return match.group(1)
31
+ return None
32
+
33
+
34
+ __version__ = _version_from_metadata() or _version_from_pyproject() or "0.0.0"
@@ -0,0 +1,84 @@
1
+ """Thin wrapper that downloads and runs the MiniMax CLI binary."""
2
+
3
+ import os
4
+ import platform
5
+ import stat
6
+ import sys
7
+ from pathlib import Path
8
+ from urllib.request import urlopen
9
+
10
+ from minimax_cli import __version__
11
+
12
+ REPO = "Hmbown/MiniMax-CLI"
13
+
14
+
15
+ def main() -> None:
16
+ """Entry point - resolve binary and exec it."""
17
+ binary = resolve_binary()
18
+ os.execv(binary, [binary, *sys.argv[1:]])
19
+
20
+
21
+ def resolve_binary() -> str:
22
+ """Find or download the minimax binary."""
23
+ # Allow override via environment
24
+ override = os.getenv("MINIMAX_CLI_PATH")
25
+ if override and Path(override).exists():
26
+ return override
27
+
28
+ # Check cache
29
+ cache_dir = Path.home() / ".minimax" / "bin" / __version__
30
+ cache_dir.mkdir(parents=True, exist_ok=True)
31
+
32
+ asset_name = get_asset_name()
33
+ bin_name = "minimax.exe" if sys.platform == "win32" else "minimax"
34
+ dest = cache_dir / bin_name
35
+
36
+ if dest.exists():
37
+ return str(dest)
38
+
39
+ if os.getenv("MINIMAX_CLI_SKIP_DOWNLOAD") in ("1", "true", "TRUE"):
40
+ raise RuntimeError("minimax binary not found and downloads are disabled.")
41
+
42
+ # Download from GitHub releases
43
+ url = f"https://github.com/{REPO}/releases/download/v{__version__}/{asset_name}"
44
+ print(f"Downloading MiniMax CLI v{__version__}...", file=sys.stderr)
45
+ download_binary(url, dest)
46
+ return str(dest)
47
+
48
+
49
+ def get_asset_name() -> str:
50
+ """Get the release asset name for this platform."""
51
+ system = platform.system().lower()
52
+ arch = platform.machine().lower()
53
+
54
+ if system == "linux" and arch in ("x86_64", "amd64"):
55
+ return "minimax-linux-x64"
56
+ if system == "darwin" and arch in ("arm64", "aarch64"):
57
+ return "minimax-macos-arm64"
58
+ if system == "darwin" and arch in ("x86_64", "amd64"):
59
+ return "minimax-macos-x64"
60
+ if system == "windows" and arch in ("x86_64", "amd64", "amd64"):
61
+ return "minimax-windows-x64.exe"
62
+
63
+ raise RuntimeError(f"Unsupported platform: {system}/{arch}")
64
+
65
+
66
+ def download_binary(url: str, dest: Path) -> None:
67
+ """Download binary from URL to destination."""
68
+ try:
69
+ with urlopen(url, timeout=60) as response:
70
+ data = response.read()
71
+ except Exception as e:
72
+ raise RuntimeError(f"Failed to download: {e}") from e
73
+
74
+ dest.write_bytes(data)
75
+
76
+ # Make executable on Unix
77
+ if sys.platform != "win32":
78
+ dest.chmod(dest.stat().st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
79
+
80
+ print(f"Installed to {dest}", file=sys.stderr)
81
+
82
+
83
+ if __name__ == "__main__":
84
+ main()
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+