MiniMax-CLI 0.2.0__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.
- minimax_cli-0.2.0/PKG-INFO +104 -0
- minimax_cli-0.2.0/README.md +90 -0
- minimax_cli-0.2.0/pyproject.toml +30 -0
- minimax_cli-0.2.0/python/MiniMax_CLI.egg-info/PKG-INFO +104 -0
- minimax_cli-0.2.0/python/MiniMax_CLI.egg-info/SOURCES.txt +9 -0
- minimax_cli-0.2.0/python/MiniMax_CLI.egg-info/dependency_links.txt +1 -0
- minimax_cli-0.2.0/python/MiniMax_CLI.egg-info/entry_points.txt +2 -0
- minimax_cli-0.2.0/python/MiniMax_CLI.egg-info/top_level.txt +1 -0
- minimax_cli-0.2.0/python/minimax_cli/__init__.py +3 -0
- minimax_cli-0.2.0/python/minimax_cli/cli.py +79 -0
- minimax_cli-0.2.0/setup.cfg +4 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: MiniMax-CLI
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Official Unofficial MiniMax Platform CLI
|
|
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: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.8
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
15
|
+
# MiniMax CLI
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
███╗ ███╗██╗███╗ ██╗██╗███╗ ███╗ █████╗ ██╗ ██╗
|
|
19
|
+
████╗ ████║██║████╗ ██║██║████╗ ████║██╔══██╗╚██╗██╔╝
|
|
20
|
+
██╔████╔██║██║██╔██╗ ██║██║██╔████╔██║███████║ ╚███╔╝
|
|
21
|
+
██║╚██╔╝██║██║██║╚██╗██║██║██║╚██╔╝██║██╔══██║ ██╔██╗
|
|
22
|
+
██║ ╚═╝ ██║██║██║ ╚████║██║██║ ╚═╝ ██║██║ ██║██╔╝ ██╗
|
|
23
|
+
╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Chat with MiniMax M2.1 from your terminal.
|
|
27
|
+
|
|
28
|
+
> **Unofficial CLI** - Not affiliated with MiniMax Inc.
|
|
29
|
+
|
|
30
|
+
## Install
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cargo install minimax-cli
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Or build from source:
|
|
37
|
+
```bash
|
|
38
|
+
git clone https://github.com/Hmbown/MiniMax-CLI
|
|
39
|
+
cd MiniMax-CLI
|
|
40
|
+
cargo install --path .
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Start chatting (opens interactive TUI)
|
|
47
|
+
minimax
|
|
48
|
+
|
|
49
|
+
# One-shot prompt
|
|
50
|
+
minimax -p "Explain quantum computing"
|
|
51
|
+
|
|
52
|
+
# YOLO mode (enables agent tools + shell execution)
|
|
53
|
+
minimax --yolo
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
That's it. Just run `minimax` and start chatting.
|
|
57
|
+
|
|
58
|
+
## First Run
|
|
59
|
+
|
|
60
|
+
On first run, you'll be prompted to enter your MiniMax API key. Get one at [platform.minimax.chat](https://platform.minimax.chat).
|
|
61
|
+
|
|
62
|
+
Your key is saved to `~/.minimax/config.toml`.
|
|
63
|
+
|
|
64
|
+
## Commands
|
|
65
|
+
|
|
66
|
+
Inside the TUI, use slash commands:
|
|
67
|
+
|
|
68
|
+
| Command | Description |
|
|
69
|
+
|---------|-------------|
|
|
70
|
+
| `/help` | Show help |
|
|
71
|
+
| `/clear` | Clear conversation |
|
|
72
|
+
| `/yolo` | Enable agent mode + shell |
|
|
73
|
+
| `/exit` | Exit |
|
|
74
|
+
|
|
75
|
+
## Keyboard Shortcuts
|
|
76
|
+
|
|
77
|
+
| Key | Action |
|
|
78
|
+
|-----|--------|
|
|
79
|
+
| `Enter` | Send message |
|
|
80
|
+
| `Ctrl+C` | Exit |
|
|
81
|
+
| `F1` | Help |
|
|
82
|
+
| `Up/Down` | History |
|
|
83
|
+
|
|
84
|
+
## Configuration
|
|
85
|
+
|
|
86
|
+
Edit `~/.minimax/config.toml`:
|
|
87
|
+
|
|
88
|
+
```toml
|
|
89
|
+
api_key = "your-api-key"
|
|
90
|
+
default_text_model = "MiniMax-M2.1"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Or use environment variables:
|
|
94
|
+
```bash
|
|
95
|
+
export MINIMAX_API_KEY=your-api-key
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
|
|
100
|
+
MIT
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
*This is an unofficial, community-maintained project. MiniMax and the MiniMax logo are trademarks of MiniMax Inc.*
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# MiniMax CLI
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
███╗ ███╗██╗███╗ ██╗██╗███╗ ███╗ █████╗ ██╗ ██╗
|
|
5
|
+
████╗ ████║██║████╗ ██║██║████╗ ████║██╔══██╗╚██╗██╔╝
|
|
6
|
+
██╔████╔██║██║██╔██╗ ██║██║██╔████╔██║███████║ ╚███╔╝
|
|
7
|
+
██║╚██╔╝██║██║██║╚██╗██║██║██║╚██╔╝██║██╔══██║ ██╔██╗
|
|
8
|
+
██║ ╚═╝ ██║██║██║ ╚████║██║██║ ╚═╝ ██║██║ ██║██╔╝ ██╗
|
|
9
|
+
╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Chat with MiniMax M2.1 from your terminal.
|
|
13
|
+
|
|
14
|
+
> **Unofficial CLI** - Not affiliated with MiniMax Inc.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
cargo install minimax-cli
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Or build from source:
|
|
23
|
+
```bash
|
|
24
|
+
git clone https://github.com/Hmbown/MiniMax-CLI
|
|
25
|
+
cd MiniMax-CLI
|
|
26
|
+
cargo install --path .
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Start chatting (opens interactive TUI)
|
|
33
|
+
minimax
|
|
34
|
+
|
|
35
|
+
# One-shot prompt
|
|
36
|
+
minimax -p "Explain quantum computing"
|
|
37
|
+
|
|
38
|
+
# YOLO mode (enables agent tools + shell execution)
|
|
39
|
+
minimax --yolo
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
That's it. Just run `minimax` and start chatting.
|
|
43
|
+
|
|
44
|
+
## First Run
|
|
45
|
+
|
|
46
|
+
On first run, you'll be prompted to enter your MiniMax API key. Get one at [platform.minimax.chat](https://platform.minimax.chat).
|
|
47
|
+
|
|
48
|
+
Your key is saved to `~/.minimax/config.toml`.
|
|
49
|
+
|
|
50
|
+
## Commands
|
|
51
|
+
|
|
52
|
+
Inside the TUI, use slash commands:
|
|
53
|
+
|
|
54
|
+
| Command | Description |
|
|
55
|
+
|---------|-------------|
|
|
56
|
+
| `/help` | Show help |
|
|
57
|
+
| `/clear` | Clear conversation |
|
|
58
|
+
| `/yolo` | Enable agent mode + shell |
|
|
59
|
+
| `/exit` | Exit |
|
|
60
|
+
|
|
61
|
+
## Keyboard Shortcuts
|
|
62
|
+
|
|
63
|
+
| Key | Action |
|
|
64
|
+
|-----|--------|
|
|
65
|
+
| `Enter` | Send message |
|
|
66
|
+
| `Ctrl+C` | Exit |
|
|
67
|
+
| `F1` | Help |
|
|
68
|
+
| `Up/Down` | History |
|
|
69
|
+
|
|
70
|
+
## Configuration
|
|
71
|
+
|
|
72
|
+
Edit `~/.minimax/config.toml`:
|
|
73
|
+
|
|
74
|
+
```toml
|
|
75
|
+
api_key = "your-api-key"
|
|
76
|
+
default_text_model = "MiniMax-M2.1"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Or use environment variables:
|
|
80
|
+
```bash
|
|
81
|
+
export MINIMAX_API_KEY=your-api-key
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## License
|
|
85
|
+
|
|
86
|
+
MIT
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
*This is an unofficial, community-maintained project. MiniMax and the MiniMax logo are trademarks of MiniMax Inc.*
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "MiniMax-CLI"
|
|
7
|
+
version = "0.2.0"
|
|
8
|
+
description = "Official Unofficial MiniMax Platform CLI"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
authors = [{ name = "Hmbown" }]
|
|
12
|
+
keywords = ["minimax", "cli", "ai", "agent"]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"License :: OSI Approved :: MIT License",
|
|
16
|
+
"Operating System :: OS Independent",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
[project.urls]
|
|
20
|
+
Homepage = "https://github.com/Hmbown/MiniMax-CLI"
|
|
21
|
+
Source = "https://github.com/Hmbown/MiniMax-CLI"
|
|
22
|
+
|
|
23
|
+
[project.scripts]
|
|
24
|
+
minimax-cli = "minimax_cli.cli:main"
|
|
25
|
+
|
|
26
|
+
[tool.setuptools.package-dir]
|
|
27
|
+
"" = "python"
|
|
28
|
+
|
|
29
|
+
[tool.setuptools.packages.find]
|
|
30
|
+
where = ["python"]
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: MiniMax-CLI
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Official Unofficial MiniMax Platform CLI
|
|
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: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.8
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
15
|
+
# MiniMax CLI
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
███╗ ███╗██╗███╗ ██╗██╗███╗ ███╗ █████╗ ██╗ ██╗
|
|
19
|
+
████╗ ████║██║████╗ ██║██║████╗ ████║██╔══██╗╚██╗██╔╝
|
|
20
|
+
██╔████╔██║██║██╔██╗ ██║██║██╔████╔██║███████║ ╚███╔╝
|
|
21
|
+
██║╚██╔╝██║██║██║╚██╗██║██║██║╚██╔╝██║██╔══██║ ██╔██╗
|
|
22
|
+
██║ ╚═╝ ██║██║██║ ╚████║██║██║ ╚═╝ ██║██║ ██║██╔╝ ██╗
|
|
23
|
+
╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Chat with MiniMax M2.1 from your terminal.
|
|
27
|
+
|
|
28
|
+
> **Unofficial CLI** - Not affiliated with MiniMax Inc.
|
|
29
|
+
|
|
30
|
+
## Install
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cargo install minimax-cli
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Or build from source:
|
|
37
|
+
```bash
|
|
38
|
+
git clone https://github.com/Hmbown/MiniMax-CLI
|
|
39
|
+
cd MiniMax-CLI
|
|
40
|
+
cargo install --path .
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Start chatting (opens interactive TUI)
|
|
47
|
+
minimax
|
|
48
|
+
|
|
49
|
+
# One-shot prompt
|
|
50
|
+
minimax -p "Explain quantum computing"
|
|
51
|
+
|
|
52
|
+
# YOLO mode (enables agent tools + shell execution)
|
|
53
|
+
minimax --yolo
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
That's it. Just run `minimax` and start chatting.
|
|
57
|
+
|
|
58
|
+
## First Run
|
|
59
|
+
|
|
60
|
+
On first run, you'll be prompted to enter your MiniMax API key. Get one at [platform.minimax.chat](https://platform.minimax.chat).
|
|
61
|
+
|
|
62
|
+
Your key is saved to `~/.minimax/config.toml`.
|
|
63
|
+
|
|
64
|
+
## Commands
|
|
65
|
+
|
|
66
|
+
Inside the TUI, use slash commands:
|
|
67
|
+
|
|
68
|
+
| Command | Description |
|
|
69
|
+
|---------|-------------|
|
|
70
|
+
| `/help` | Show help |
|
|
71
|
+
| `/clear` | Clear conversation |
|
|
72
|
+
| `/yolo` | Enable agent mode + shell |
|
|
73
|
+
| `/exit` | Exit |
|
|
74
|
+
|
|
75
|
+
## Keyboard Shortcuts
|
|
76
|
+
|
|
77
|
+
| Key | Action |
|
|
78
|
+
|-----|--------|
|
|
79
|
+
| `Enter` | Send message |
|
|
80
|
+
| `Ctrl+C` | Exit |
|
|
81
|
+
| `F1` | Help |
|
|
82
|
+
| `Up/Down` | History |
|
|
83
|
+
|
|
84
|
+
## Configuration
|
|
85
|
+
|
|
86
|
+
Edit `~/.minimax/config.toml`:
|
|
87
|
+
|
|
88
|
+
```toml
|
|
89
|
+
api_key = "your-api-key"
|
|
90
|
+
default_text_model = "MiniMax-M2.1"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Or use environment variables:
|
|
94
|
+
```bash
|
|
95
|
+
export MINIMAX_API_KEY=your-api-key
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
|
|
100
|
+
MIT
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
*This is an unofficial, community-maintained project. MiniMax and the MiniMax logo are trademarks of MiniMax Inc.*
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
python/MiniMax_CLI.egg-info/PKG-INFO
|
|
4
|
+
python/MiniMax_CLI.egg-info/SOURCES.txt
|
|
5
|
+
python/MiniMax_CLI.egg-info/dependency_links.txt
|
|
6
|
+
python/MiniMax_CLI.egg-info/entry_points.txt
|
|
7
|
+
python/MiniMax_CLI.egg-info/top_level.txt
|
|
8
|
+
python/minimax_cli/__init__.py
|
|
9
|
+
python/minimax_cli/cli.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
minimax_cli
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import platform
|
|
3
|
+
import sys
|
|
4
|
+
import tarfile
|
|
5
|
+
import zipfile
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
from urllib.request import urlopen
|
|
8
|
+
|
|
9
|
+
from minimax_cli import __version__
|
|
10
|
+
|
|
11
|
+
REPO = "Hmbown/MiniMax-CLI"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def main() -> None:
|
|
15
|
+
binary = resolve_binary()
|
|
16
|
+
os.execv(binary, [binary, *sys.argv[1:]])
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def resolve_binary() -> str:
|
|
20
|
+
override = os.getenv("MINIMAX_CLI_PATH")
|
|
21
|
+
if override and Path(override).exists():
|
|
22
|
+
return override
|
|
23
|
+
|
|
24
|
+
cache_dir = Path.home() / ".minimax" / "bin" / __version__
|
|
25
|
+
target, archive_ext = detect_target()
|
|
26
|
+
bin_name = "minimax-cli.exe" if os.name == "nt" else "minimax-cli"
|
|
27
|
+
dest = cache_dir / target / bin_name
|
|
28
|
+
|
|
29
|
+
if dest.exists():
|
|
30
|
+
return str(dest)
|
|
31
|
+
|
|
32
|
+
if os.getenv("MINIMAX_CLI_SKIP_DOWNLOAD") in ("1", "true", "TRUE"):
|
|
33
|
+
raise RuntimeError("minimax-cli binary not found and downloads are disabled.")
|
|
34
|
+
|
|
35
|
+
url = (
|
|
36
|
+
f"https://github.com/{REPO}/releases/download/v{__version__}/"
|
|
37
|
+
f"minimax-cli-{__version__}-{target}.{archive_ext}"
|
|
38
|
+
)
|
|
39
|
+
download_and_extract(url, dest, archive_ext)
|
|
40
|
+
return str(dest)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def detect_target() -> tuple[str, str]:
|
|
44
|
+
system = platform.system().lower()
|
|
45
|
+
arch = platform.machine().lower()
|
|
46
|
+
|
|
47
|
+
if system == "linux" and arch in ("x86_64", "amd64"):
|
|
48
|
+
return "x86_64-unknown-linux-gnu", "tar.gz"
|
|
49
|
+
if system == "darwin" and arch in ("arm64", "aarch64"):
|
|
50
|
+
return "aarch64-apple-darwin", "tar.gz"
|
|
51
|
+
if system == "darwin" and arch in ("x86_64", "amd64"):
|
|
52
|
+
return "x86_64-apple-darwin", "tar.gz"
|
|
53
|
+
if system == "windows" and arch in ("x86_64", "amd64"):
|
|
54
|
+
return "x86_64-pc-windows-msvc", "zip"
|
|
55
|
+
|
|
56
|
+
raise RuntimeError(f"Unsupported platform: {system}/{arch}")
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def download_and_extract(url: str, dest: Path, archive_ext: str) -> None:
|
|
60
|
+
dest.parent.mkdir(parents=True, exist_ok=True)
|
|
61
|
+
tmp_path = dest.with_suffix(".download")
|
|
62
|
+
|
|
63
|
+
with urlopen(url) as response, open(tmp_path, "wb") as handle:
|
|
64
|
+
handle.write(response.read())
|
|
65
|
+
|
|
66
|
+
if archive_ext == "zip":
|
|
67
|
+
with zipfile.ZipFile(tmp_path) as archive:
|
|
68
|
+
archive.extractall(dest.parent)
|
|
69
|
+
else:
|
|
70
|
+
with tarfile.open(tmp_path, "r:gz") as archive:
|
|
71
|
+
archive.extractall(dest.parent)
|
|
72
|
+
|
|
73
|
+
tmp_path.unlink(missing_ok=True)
|
|
74
|
+
|
|
75
|
+
if not dest.exists():
|
|
76
|
+
raise RuntimeError("Binary not found in release archive.")
|
|
77
|
+
|
|
78
|
+
if os.name != "nt":
|
|
79
|
+
dest.chmod(dest.stat().st_mode | 0o111)
|