Communitygithub.com

cli-anything-novita

基于 Novita AI 的命令行工具,提供 OpenAI 兼容的 API 接口,支持 DeepSeek、GLM 等主流 AI 模型。

cli-anything-novita 是什么?

cli-anything-novita 是一个针对 Novita AI 平台开发的命令行工具,提供了与 OpenAI API 完全兼容的接口,支持 DeepSeek、GLM-5、MiniMax 等多种主流 AI 模型。该工具适用于 Python 3.10+ 环境,通过 pip 安装即可使用。主要功能包括交互式 REPL 模式、模型聊天、流式输出、会话管理、配置管理和模型列表查询等。所有命令都支持人类可读的表格格式和机器可读的 JSON 格式输出,特别适合集成到自动化工作流或 AI Agent 系统中。用户可以通过配置文件或环境变量设置 Novita API 密钥,并使用 --json 标志获取结构化输出,便于程序解析和处理。

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

在你喜欢的 AI 中提问

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

文档

cli-anything-novita 是做什么的?

Novita AI 的命令行工具 —— 一个兼容 OpenAI API 的服务,支持 DeepSeek、GLM 等多种 AI 模型。

安装

本 CLI 作为 cli-anything-novita 包的一部分安装:

pip install cli-anything-novita

前提条件:

  • Python 3.10+
  • 来自 novita.ai 的 Novita API 密钥

使用方法

基本命令

# 显示帮助
cli-anything-novita --help

# 启动交互式 REPL 模式
cli-anything-novita

# 与模型对话
cli-anything-novita chat --prompt "什么是 AI?" --model deepseek/deepseek-v3.2

# 流式对话
cli-anything-novita stream --prompt "写一首关于代码的诗"

# 列出可用模型
cli-anything-novita models

# JSON 输出(供 Agent 使用)
cli-anything-novita --json chat --prompt "你好"

REPL 模式

当不提供子命令时,CLI 会进入交互式 REPL 会话:

cli-anything-novita
# 进入交互模式,支持 Tab 补全和历史记录

命令组

对话

通过 Novita API 与 AI 模型对话。

命令描述
chat与 Novita API 对话
stream流式对话补全

会话

对话历史管理。

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

配置

配置管理。

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

工具

命令描述
test测试 API 连接
models列出可用模型

示例

配置 API 密钥

# 通过配置文件设置 API 密钥(推荐)
cli-anything-novita config set api_key "sk-xxx"

# 或使用环境变量
export NOVITA_API_KEY="sk-xxx"

与 DeepSeek 对话

# 简单对话
cli-anything-novita chat --prompt "解释量子计算" --model deepseek/deepseek-v3.2

# 流式对话
cli-anything-novita stream --prompt "编写一个计算阶乘的 Python 函数"

测试连接

# 验证 API 密钥和连接
cli-anything-novita test --model deepseek/deepseek-v3.2

# 列出所有可用模型
cli-anything-novita models

默认模型

Novita API 支持多种模型提供商:

模型 ID提供商描述
deepseek/deepseek-v3.2DeepSeekDeepSeek V3.2 模型(默认)
zai-org/glm-5智谱 AIGLM-5 模型
minimax/minimax-m2.5MiniMaxMiniMax M2.5 模型

输出格式

所有命令均支持双输出模式:

  • 人类可读(默认):表格、颜色、格式化文本
  • 机器可读(--json 标志):供 Agent 消费的结构化 JSON
# 人类可读输出
cli-anything-novita chat --prompt "你好"

# 供 Agent 使用的 JSON 输出
cli-anything-novita --json chat --prompt "你好"

针对 AI Agent 的使用说明

在程序化使用此 CLI 时:

  1. 始终使用 --json 标志 以获取可解析的输出
  2. 检查返回码 —— 0 表示成功,非零表示错误
  3. 解析 stderr 以获取失败时的错误信息
  4. 对所有文件操作使用绝对路径
  5. 在导出操作后验证输出是否存在

更多信息

  • 完整文档:请参见包内的 README.md
  • 测试覆盖:请参见包内的 TEST.md
  • 方法论:请参见 cli-anything-plugin 中的 HARNESS.md

版本

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

>-

相关技能