CLI
一个轻量的命令行客户端,用于从终端与你的工作区聊天——支持流式回复、交互式会话以及 stdin 管道。它对接的是 OpenAI 兼容端点,因此只需要一个工作区 API 密钥。
安装
CLI 随 nexevo-ai 仓库分发。在代码检出目录下,以模块方式运行:
bash
python -m cli --help
# optional: a shorter alias for the examples below
alias nexevo='python -m cli'配置
保存一次你的工作区 API 密钥(写入 ~/.nexevo/config.json,仅文件所有者可读):
bash
nexevo config set api_key sk-ws-...
nexevo config show # api_key is masked环境变量会覆盖已保存的配置:NEXEVO_API_KEY、NEXEVO_BASE_URL(默认为 https://nexevo.ai/v1)、NEXEVO_MODEL。
聊天
bash
# one-shot
nexevo chat "Summarize our Q2 results."
# interactive session (keeps the conversation; empty line or Ctrl-D to exit)
nexevo chat
# pipe stdin
git diff | nexevo chat "Review this change."
# pin a specific model (default is nexevo-auto → the router picks)
nexevo chat --model nexevo-auto "Draft a release note."回复会逐 token 流式输出。路由、计费和 BYOK 与其他所有 Nexevo 调用完全一致——CLI 只是一个架在 OpenAI 兼容 API 之上的轻量客户端。