Cli Anything Novita

作者 hkuds34f519533bc1無授權條款51K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫2 週前更新

Command-line interface for Novita AI - An OpenAI-compatible AI API client for DeepSeek, GLM, and other models.

AI 產生的概覽

介紹 Novita AI 介面的命令列用戶端,提供對話、串流輸出、模型清單、工作階段與設定命令。

功能
此技能介紹 cli-anything-novita,這是針對 Novita AI 這套相容於 OpenAI 的 API 服務所提供的命令列工具。內容涵蓋以 pip 安裝、對話與串流對話命令、模型清單、工作階段歷史管理,以及 API 金鑰設定。它也說明了供人閱讀與供程式解析的 JSON 兩種輸出模式。
適用情境
當需要在終端機或指令碼中呼叫 DeepSeek、GLM 等 Novita AI 模型時使用。適合互動式對話、指令碼化的提示詞,以及檢查 API 連線狀態或可用模型。
執行需求
需要 Python 3.10+,並以 pip 安裝 cli-anything-novita 套件。需要 Novita API 金鑰,可透過 config 命令或 NOVITA_API_KEY 環境變數設定,並需要連線至 Novita API 的網路存取。此技能僅包含說明文件,未附帶指令碼。

cli-anything-novita

A CLI harness for Novita AI - an OpenAI-compatible API service for AI models like DeepSeek, GLM, and others.

Installation

This CLI is installed as part of the cli-anything-novita package:

bash
pip install cli-anything-novita

Prerequisites:

Usage

Basic Commands

bash
# Show helpcli-anything-novita --help
# Start interactive REPL modecli-anything-novita
# Chat with modelcli-anything-novita chat --prompt "What is AI?" --model deepseek/deepseek-v3.2
# Streaming chatcli-anything-novita stream --prompt "Write a poem about code"
# List available modelscli-anything-novita models
# JSON output (for agent consumption)cli-anything-novita --json chat --prompt "Hello"

REPL Mode

When invoked without a subcommand, the CLI enters an interactive REPL session:

bash
cli-anything-novita# Enter commands interactively with tab-completion and history

Command Groups

Chat

Chat with AI models through the Novita API.

CommandDescription
chatChat with the Novita API
streamStream chat completion

Session

Session management for chat history.

CommandDescription
statusShow session status
clearClear session history
historyShow command history

Config

Configuration management.

CommandDescription
setSet a configuration value
getGet a configuration value (or show all)
deleteDelete a configuration value
pathShow the config file path

Utility

CommandDescription
testTest API connectivity
modelsList available models

Examples

Configure API Key

bash
# Set API key via config file (recommended)cli-anything-novita config set api_key "sk-xxx"
# Or use environment variableexport NOVITA_API_KEY="sk-xxx"

Chat with DeepSeek

bash
# Simple chatcli-anything-novita chat --prompt "Explain quantum computing" --model deepseek/deepseek-v3.2
# Streaming chatcli-anything-novita stream --prompt "Write a Python function to calculate factorial"

Test Connectivity

bash
# Verify API key and connectivitycli-anything-novita test --model deepseek/deepseek-v3.2
# List all available modelscli-anything-novita models

Default Models

The Novita API supports multiple model providers:

Model IDProviderDescription
deepseek/deepseek-v3.2DeepSeekDeepSeek V3.2 model (default)
zai-org/glm-5Zhipu AIGLM-5 model
minimax/minimax-m2.5MiniMaxMiniMax M2.5 model

Output Formats

All commands support dual output modes:

  • Human-readable (default): Tables, colors, formatted text
  • Machine-readable (--json flag): Structured JSON for agent consumption
bash
# Human outputcli-anything-novita chat --prompt "Hello"
# JSON output for agentscli-anything-novita --json chat --prompt "Hello"

For AI Agents

When using this CLI programmatically:

  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 all file operations
  5. Verify outputs exist after export operations

More Information

  • Full documentation: See README.md in the package
  • Test coverage: See TEST.md in the package
  • Methodology: See HARNESS.md in the cli-anything-plugin

Version

1.0.0

來源與署名

來源:hkuds/cli-anything位於skills/cli-anything-novita提交34f5195

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架