应用
Cosvexa CLI
终端里的编程智能体:安装、登录、命令、审批模式、Council 审查和 CI 使用。
安装与登录
需要 Node.js 20 或更高版本。
bash
npm i -g https://cosvexa.ai/downloads/cosvexa-cli-0.1.0.tgz
cosvexa --version
cosvexa login --browser # device code, approve in your browser
cosvexa login # or paste an API key that starts with cvx_
cosvexa status设置文件在 Windows 上位于 %APPDATA%\cosvexa\config.json,在 macOS 和 Linux 上位于 ~/.config/cosvexa/config.json。也支持 COSVEXA_API_KEY、COSVEXA_MODEL 和 COSVEXA_BASE_URL 环境变量。
基本用法
bash
cd my-project
cosvexa "make the failing date test pass" # one task
cosvexa # interactive session
cosvexa -c "now add tests" # continue the last session
cosvexa sessions # list sessions
cosvexa init # draft COSVEXA.md project instructions
cosvexa models # models you can use模型与投入程度
-m claude-sonnet-5-5指定一个具体模型,且始终优先。--effort low|medium|high(或/effort)设置所选模型在回答前思考的程度;它不会更换模型。没有思考级别设置的模型会忽略它。
安全
--mode ask|auto-edit|plan|full-auto设置审批模式(交互式会话中按Shift+Tab)。full-auto还需要加上--yolo。--read-only只允许读取、列出和搜索工具。/undo恢复智能体最近改动的那个文件。危险命令在任何模式下都会询问,使用--yes时也一样。
代码审查与 Council
bash
cosvexa review # review local changes
cosvexa review --base main # review the diff against main
cosvexa "add input validation" --council
cosvexa --team "refactor the payments module"Council 和团队任务会先显示费用上限预估,并请你确认。
脚本与 CI
bash
cosvexa -p "summarise the open TODOs"
cosvexa -p --yes "fix the lint errors" --json退出码:0 完成,1 错误,2 用法错误,3 达到步数或输出上限而停止。
交互式命令
/model、/mode、/undo、/compact、/context、/init、/review、/team、/cost、/clear、/exit。可以用 .cosvexa/commands/<name>.md 文件添加你自己的命令;@path 用于附加文件。上下文占用达到 80% 时会自动总结。
MCP 与 OpenCode
cosvexa mcp 管理 MCP 服务器(--no-mcp 将其关闭)。cosvexa opencode 会把 OpenCode 配置为以 Cosvexa 作为服务商(请先运行 npm i -g opencode-ai)。