cli-anything-minimax

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

cli-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-harness
Prerequisites:
bash
pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=minimax/agent-harness
前置要求:

Usage

使用方法

Basic Commands

基础命令

bash
undefined
bash
undefined

Show 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"
undefined
cli-anything-minimax --json chat --prompt "Hello"
undefined

Command Groups

命令组

Chat

聊天

CommandDescription
chat
Chat with MiniMax LLM
stream
Stream chat completion
命令描述
chat
与MiniMax大语言模型聊天
stream
流式输出聊天补全结果

TTS

文本转语音(TTS)

CommandDescription
tts
Synthesize text to speech (hex-decoded MP3 via SSE)
voices
List available voice IDs
命令描述
tts
将文本合成为语音(通过SSE传输十六进制解码的MP3)
voices
列出可用的语音ID

Session

会话

CommandDescription
session status
Show session status
session clear
Clear session history
session history
Show command history
命令描述
session status
显示会话状态
session clear
清除会话历史
session history
显示命令历史

Config

配置

CommandDescription
config set
Set a configuration value
config get
Get a configuration value (or show all)
config delete
Delete a configuration value
config path
Show the config file path
命令描述
config set
设置配置值
config get
获取配置值(或显示所有配置)
config delete
删除配置值
config path
显示配置文件路径

Utility

工具

CommandDescription
test
Test API connectivity
models
List chat models
models --tts
List TTS models
命令描述
test
测试API连通性
models
列出聊天模型
models --tts
列出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"
undefined
cli-anything-minimax config set api_key "你的API密钥"
undefined

Chat

聊天

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.mp3
bash
cli-anything-minimax tts --text "你好!" --output hello.mp3
cli-anything-minimax tts --text "快速" --model speech-2.8-turbo --voice English_Insightful_Speaker --output fast.mp3

Chat Models

聊天模型

Model IDDescription
MiniMax-M2.7
Peak Performance. Ultimate Value. (default)
MiniMax-M2.7-highspeed
Same performance, faster and more agile
模型ID描述
MiniMax-M2.7
极致性能,超高性价比(默认模型)
MiniMax-M2.7-highspeed
性能一致,响应更快更灵活

TTS Models

TTS模型

Model IDDescription
speech-2.8-hd
High-definition TTS (default)
speech-2.8-turbo
Fast TTS
模型ID描述
speech-2.8-hd
高清TTS(默认模型)
speech-2.8-turbo
快速TTS

For AI Agents

面向AI Agent的使用说明

  1. Always use
    --json
    flag
    for parseable output
  2. Check return codes — 0 for success, non-zero for errors
  3. Parse stderr for error messages on failure
  4. Use absolute paths for TTS output files
  1. 始终使用
    --json
    参数
    以获得可解析的输出
  2. 检查返回码 —— 0表示成功,非0表示错误
  3. 解析stderr 获取失败时的错误信息
  4. 使用绝对路径 指定TTS输出文件

Version

版本

1.0.0
1.0.0