Communitygithub.com

cli-anything-novita

一個 CLI 工具,用來透過 Novita AI(相容 OpenAI 的 API 服務)與 DeepSeek、GLM 等 AI 模型互動。

cli-anything-novita 是什麼?

cli-anything-novita 是一個命令列介面(CLI)工具,專門用來與 Novita AI 服務進行互動。Novita AI 提供相容於 OpenAI 的 API 端點,支援包括 DeepSeek、GLM-5、MiniMax 在內的多種模型。此工具特別適合開發者與 AI 代理(agent)使用,因為它同時提供人類可讀的格式化輸出,以及供程式解析的 JSON 輸出模式。透過 `--json` 旗標,AI 代理可以輕鬆解析回傳結果,並依照錯誤碼進行錯誤處理。該套件支援聊天、串流聊天、會話管理、配置設定、模型清單查詢等功能。支援平台包括所有能執行 Python 3.10+ 的環境,並可透過 pip 安裝,相依的只有 Novita API 金鑰。

相容平台~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 的 CLI 命令列工具 — 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 輸出(供代理使用)
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 旗標):結構化 JSON,供代理使用
# 人類輸出
cli-anything-novita chat --prompt "你好"

# JSON 輸出(供代理使用)
cli-anything-novita --json chat --prompt "你好"

給 AI 代理的指示

當以程式方式使用此 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

>-

相關技能