cate-cli
GitHubCate CLI 技能,用于在 Cate 终端中通过命令行驱动工作区。支持浏览器交互、多代理协调、面板管理及文件操作,涵盖权限配置与引用文档使用。
触发场景
安装
npx skills add 0-AI-UG/cate --skill cate-cli -g -y
SKILL.md
Frontmatter
{
"name": "cate-cli",
"description": "Read this skill before the first `cate` command, the CLI on PATH in every Cate terminal (CATE_SOCKET and CATE_TOKEN are set) that drives the workspace the terminal belongs to. Use it whenever a task in a Cate terminal needs Cate itself, even if the person never mentions the CLI, such as looking at, testing or signing in to a web page in Cate's browser panel, taking a screenshot, reading or typing into another terminal, opening a file or panel for the person, starting other coding agents in their own panels or worktrees and waiting for their answers, or recording findings in a Review panel. It covers targeting panels, CLI permissions, and the browser and agent workflows. It is not for working on Cate's own source code, and not for theming Cate, which has the cate-theme skill."
}
Cate CLI
cate talks to the workspace's runtime over the local socket named by
CATE_SOCKET, authenticated by CATE_TOKEN, a per-terminal token that also
names the calling panel. It works the same when the workspace lives on
another machine. If either variable is missing, cate exits 3 and says so:
you are not in a Cate terminal, so this skill does not apply.
Reference files
Read the one for your task before its first command:
references/browser.md: the browser panel. Snapshots and element ids, clicking and typing, tabs, uploads, dialogs, saved logins and sign-ups, console and network logs, screenshots.references/agents.md: starting other coding agents, sending them prompts, waiting for and reading their answers, and typing into terminals that have no agent.
Panels, terminals, editors and Review panels are covered below.
Permissions
Each area needs its permission in the workspace's Settings → CLI: the master switch "Command-line control (cate CLI)" plus a Read and a Control cell per area (Browser, Browser passwords, Terminal, Panels, Files, Agents & reviews). Sending keystrokes to terminals (Terminal, Control) and using saved browser passwords are off by default. A denied call fails with an error naming the setting: tell the person which one to turn on instead of working around it.
Help, output and exit codes
The CLI's own help is the reference for exact syntax. Check it before guessing a flag:
cate --help # command groups and global flags
cate panel --help # the commands of one group (or just: cate panel)
cate review note add --help # one command: arguments, flags and defaults
A mistyped command suggests the closest one. Lists print as aligned tables,
other results as key value lines, structured reports as indented JSON.
Add --json to any command when you parse the result or need full ids.
Every error says what to do next.
Exit codes: 0 ok, 1 the call failed, 2 usage error (Cate was not contacted), 3 not connected to Cate.
Panels and targets
cate panel list
ID TYPE TITLE
* 1a2b3c4d terminal zsh
5e6f7a8b browser https://example.com
* marks the focused panel. Ids are short; any unique prefix works, and
--json gives full ids and each panel's worktreeId.
A command acts on, in order: --panel <id> (one command only), the panel
you selected for this terminal with cate panel set <id>, or Cate's
automatic choice (the calling panel's group, then the panel active in the
most recently used window, then the only panel of that type). The selection
belongs to your terminal, so other agents keep their own:
cate panel set 5e6f7a8b
cate panel current
cate panel clear # back to the automatic choice
A command refuses a selected panel of the wrong type instead of acting on
another one. If the selected panel was closed, select another.
terminal type, terminal press and every review command never guess:
they need --panel or a selection.
There is no panel focus: focus belongs to each person's window, not to the
workspace.
Panels and editors
cate panel create browser https://example.com # the URL is optional
cate panel create editor --file app.tsx
cate panel create terminal
cate panel create canvas
cate panel title "API tests" # rename the calling panel (or --panel <id>)
cate panel close <id> # fails with dirty on unsaved work or a running program
cate panel close <id> --discard # drops unsaved work, stops the program
cate editor open src/app.tsx:42 # reuses an editor that already shows the file
cate editor active # which file the target editor shows
panel create and editor open print the new panel's short id. New panels
open next to the calling terminal. Only pass --discard when the person
agreed to lose that work.
Reading terminals
cate terminal read --lines 40 # another terminal's screen
Typing into a terminal is in references/agents.md.
Review panels
A Review panel compares changes; you record structured findings on it. Select it once, inspect the comparison, then add notes:
cate panel set <review-panel-id>
cate review inspect
cate review note add --file src/app.ts --line 42 --side new \
--severity error --body "Handle the rejected request"
cate review note resolve <note-id>
cate review complete
Run complete only when that Review panel assigned you as its review agent.
Review commands record findings; they never modify, stage, commit or push.
Versions and serving
cate version prints the API version the runtime speaks; cate --version
the CLI's own. cate serve [<path>] [--connect] is for the person: it starts
a workspace with network access on and prints a pairing QR code, so another
device can open it.
版本历史
-
bf3edb5
当前 2026-11-02 19:38
移除了 cate notify 命令、Notifications CLI 区域及 cliNotifyEnabled 设置,运行时警告改用 runtime.warning 通知类型。
-
ea72c14
2026-10-19 02:56
重构技能结构,将主文档拆分为 SKILL.md 与按需加载的参考文件(browser.md, agents.md),细化 CLI 权限说明,并移除过时的浏览器代码会话功能。
-
b0dcf23
2026-09-27 20:14
新增直接创建和访问浏览器面板的CLI命令;移除旧的Jev浏览器控制模式;优化AX状态与截图返回机制。
-
3fdb01a
2026-09-22 08:25
新增面板关系工作流(panel relation workflows),完善终端注册表拖拽模拟测试;此前版本支持下载页面资产。
-
6caa55b
2026-09-09 02:51
重构浏览器控制逻辑,移除旧版 argv 动作,引入基于 cua 标签 API 的持久化 JS 交互;优化代理观测数据格式,支持更精确的无障碍状态访问与截图。
-
22f753b
2026-08-16 02:36
新增递归智能体编排功能暴露
- ba34121 2026-07-24 12:17


