cli-anything-minimax
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesecli-anything-minimax
cli-anything-minimax
A CLI harness for MiniMax AI — providing chat completions and text-to-speech synthesis through the MiniMax API.
一款面向 MiniMax AI 的 CLI 工具包——通过 MiniMax API 提供聊天补全与文本转语音合成功能。
Installation
安装
bash
pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=minimax/agent-harnessPrerequisites:
- Python 3.10+
- MiniMax API key from platform.minimax.io
bash
pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=minimax/agent-harness前置要求:
- Python 3.10+
- 从 platform.minimax.io 获取的 MiniMax API 密钥
Usage
使用方法
Basic Commands
基础命令
bash
undefinedbash
undefinedShow help
显示帮助信息
cli-anything-minimax --help
cli-anything-minimax --help
Start interactive REPL
启动交互式REPL环境
cli-anything-minimax
cli-anything-minimax
Chat with MiniMax-M2.7
与 MiniMax-M2.7 聊天
cli-anything-minimax chat --prompt "What is AI?"
cli-anything-minimax chat --prompt "什么是AI?"
High-speed model
高速模型
cli-anything-minimax chat --prompt "Quick answer" --model MiniMax-M2.7-highspeed
cli-anything-minimax chat --prompt "快速回答" --model MiniMax-M2.7-highspeed
Stream chat response
流式输出聊天响应
cli-anything-minimax stream --prompt "Write a poem about code"
cli-anything-minimax stream --prompt "写一首关于代码的诗"
Synthesize speech
合成语音
cli-anything-minimax tts --text "Hello world" --output hello.mp3
cli-anything-minimax tts --text "Hello world" --output hello.mp3
JSON output for agents
为Agent输出JSON格式结果
cli-anything-minimax --json chat --prompt "Hello"
undefinedcli-anything-minimax --json chat --prompt "Hello"
undefinedCommand Groups
命令组
Chat
聊天
| Command | Description |
|---|---|
| Chat with MiniMax LLM |
| Stream chat completion |
| 命令 | 描述 |
|---|---|
| 与MiniMax大语言模型聊天 |
| 流式输出聊天补全结果 |
TTS
文本转语音(TTS)
| Command | Description |
|---|---|
| Synthesize text to speech (hex-decoded MP3 via SSE) |
| List available voice IDs |
| 命令 | 描述 |
|---|---|
| 将文本合成为语音(通过SSE传输十六进制解码的MP3) |
| 列出可用的语音ID |
Session
会话
| Command | Description |
|---|---|
| Show session status |
| Clear session history |
| Show command history |
| 命令 | 描述 |
|---|---|
| 显示会话状态 |
| 清除会话历史 |
| 显示命令历史 |
Config
配置
| Command | Description |
|---|---|
| Set a configuration value |
| Get a configuration value (or show all) |
| Delete a configuration value |
| Show the config file path |
| 命令 | 描述 |
|---|---|
| 设置配置值 |
| 获取配置值(或显示所有配置) |
| 删除配置值 |
| 显示配置文件路径 |
Utility
工具
| Command | Description |
|---|---|
| Test API connectivity |
| List chat models |
| List TTS models |
| 命令 | 描述 |
|---|---|
| 测试API连通性 |
| 列出聊天模型 |
| 列出TTS模型 |
Examples
示例
Configure API Key
配置API密钥
bash
export MINIMAX_API_KEY="your-api-key"bash
export MINIMAX_API_KEY="你的API密钥"or
或者
cli-anything-minimax config set api_key "your-api-key"
undefinedcli-anything-minimax config set api_key "你的API密钥"
undefinedChat
聊天
bash
cli-anything-minimax chat --prompt "Explain quantum computing"
cli-anything-minimax stream --prompt "Write a Python quicksort"bash
cli-anything-minimax chat --prompt "解释量子计算"
cli-anything-minimax stream --prompt "写一个Python快速排序算法"TTS
文本转语音
bash
cli-anything-minimax tts --text "Hello!" --output hello.mp3
cli-anything-minimax tts --text "Fast" --model speech-2.8-turbo --voice English_Insightful_Speaker --output fast.mp3bash
cli-anything-minimax tts --text "你好!" --output hello.mp3
cli-anything-minimax tts --text "快速" --model speech-2.8-turbo --voice English_Insightful_Speaker --output fast.mp3Chat Models
聊天模型
| Model ID | Description |
|---|---|
| Peak Performance. Ultimate Value. (default) |
| Same performance, faster and more agile |
| 模型ID | 描述 |
|---|---|
| 极致性能,超高性价比(默认模型) |
| 性能一致,响应更快更灵活 |
TTS Models
TTS模型
| Model ID | Description |
|---|---|
| High-definition TTS (default) |
| Fast TTS |
| 模型ID | 描述 |
|---|---|
| 高清TTS(默认模型) |
| 快速TTS |
For AI Agents
面向AI Agent的使用说明
- Always use flag for parseable output
--json - Check return codes — 0 for success, non-zero for errors
- Parse stderr for error messages on failure
- Use absolute paths for TTS output files
- 始终使用 参数 以获得可解析的输出
--json - 检查返回码 —— 0表示成功,非0表示错误
- 解析stderr 获取失败时的错误信息
- 使用绝对路径 指定TTS输出文件
Version
版本
1.0.0
1.0.0