Communitygithub.com

CLI Anything - MiniMax

为MiniMax AI提供命令行工具,支持聊天补全和文本转语音合成。

CLI Anything - MiniMax 是什么?

这是一个基于MiniMax API的命令行工具,专为AI代理和开发者设计,提供聊天补全和文本转语音(TTS)合成功能。它支持多种MiniMax模型,包括旗舰级MiniMax-M3和高效的MiniMax-M2.7聊天模型,以及多种TTS模型(如speech-2.8-hd、speech-2.8-turbo等)。该工具可以通过pip从GitHub安装,依赖Python 3.10+和MiniMax API密钥。它提供交互式REPL模式、流式聊天响应、可配置的TTS参数(如语速、音量、音调、采样率、比特率、格式和声道),以及丰富的命令组,包括Chat、TTS、Session、Config和Utility。对于AI代理集成,建议始终使用--json标志以获取可解析的输出,并检查返回码和stderr以处理错误。该工具特别适合需要自动化文本生成和语音合成的场景,如AI客服、内容生成和语音助手开发。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-minimax

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

CLI Anything - MiniMax 是做什么的?

一个为 MiniMax AI 设计的命令行工具集 — 通过 MiniMax API 提供聊天补全和文本转语音合成功能。

安装

pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=minimax/agent-harness

前提条件:

使用方法

基本命令

# 显示帮助信息
cli-anything-minimax --help

# 启动交互式 REPL
cli-anything-minimax

# 与 MiniMax-M3 聊天
cli-anything-minimax chat --prompt "什么是人工智能?"

# 使用其他聊天模型
cli-anything-minimax chat --prompt "快速回答" --model MiniMax-M2.7

# 流式聊天响应
cli-anything-minimax stream --prompt "写一首关于代码的诗"

# 合成语音
cli-anything-minimax tts --text "你好,世界" --output hello.mp3

# JSON 输出(适用于代理)
cli-anything-minimax --json chat --prompt "你好"

TTS 选项

--text(必需)/ --model / --voice / --output 以及语音和音频 控制选项:--speed(0.5..2.0)、--vol(0..10)、--pitch(-12..12)、 --sample-rate(8k/16k/22.05k/24k/32k/44.1k)、--bitrate(32k/64k/128k/256k)、 --format(mp3/pcm/flac)、--channel(1/2)。请参见 tts --help 获取默认值。

命令组

聊天

命令描述
chat与 MiniMax LLM 聊天
stream流式聊天补全

文本转语音

命令描述
tts将文本合成为语音(通过 SSE 返回十六进制解码的 MP3)
voices列出可用的语音 ID

会话

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

配置

命令描述
config set设置配置值
config get获取配置值(或显示所有)
config delete删除配置值
config path显示配置文件路径

实用工具

命令描述
test测试 API 连接
models列出聊天模型
models --tts列出 TTS 模型

示例

配置 API 密钥

export MINIMAX_API_KEY="你的-api-密钥"
# 或者
cli-anything-minimax config set api_key "你的-api-密钥"

聊天

cli-anything-minimax chat --prompt "解释量子计算"
cli-anything-minimax stream --prompt "编写一个 Python 快速排序"

文本转语音

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

聊天模型

模型 ID描述
MiniMax-M3下一代旗舰模型(默认)
MiniMax-M2.7巅峰性能,极致价值

TTS 模型

模型 ID描述
speech-2.8-hd高清 TTS(默认)
speech-2.8-turbo快速 TTS
speech-2.6-hd高清 TTS
speech-2.6-turbo快速 TTS
speech-02-hd高清 TTS
speech-02-turbo快速 TTS
speech-01-hd高清 TTS
speech-01-turbo快速 TTS

供 AI 代理使用

  1. 始终使用 --json 标志 以获得可解析的输出
  2. 检查返回码 — 0 表示成功,非零表示错误
  3. 解析 stderr 以获取错误信息(如果失败)
  4. 使用绝对路径 作为 TTS 输出文件

版本

1.0.0

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-chromadb

>-

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-godot

>-

相关技能