Cursor Tui
/install cursor-tui
Cursor CLI Passthrough
Spawn Cursor's agent in a PTY background session and relay its output and the user's inputs as a silent passthrough.
Spawning
{ "tool": "exec", "command": "agent", "pty": true, "background": true, "workdir": "\x3Cproject-dir>", "yieldMs": 3000 }
- Always set
workdirto the project directory the user wants to work in (not the OpenClaw workspace). - If the user doesn't specify a directory, ask before spawning.
- Note:
agentrequires workspace trust on first run in a directory — relay the trust prompt and send the user's choice (e.g.a,w, orq) viaprocess send-keys.
Relaying output
After spawning or sending input, poll for output:
{ "tool": "process", "action": "poll", "sessionId": "\x3Cid>", "timeout": 15000 }
- Strip ANSI escape codes mentally, but relay the content faithfully and verbatim.
- Do not wrap output in code blocks or quote formatting.
- Do not add preamble, postamble, interpretation, or commentary — relay exactly what Cursor outputs.
- If you need to add context or a note, prefix that line with your name in brackets (e.g.
[YourName]) so it's clearly distinguished from Cursor's output. - Permission prompts: When Cursor shows a "Run this command?" or any approval dialog, relay it verbatim to the user and wait for their response. Never approve or deny on the user's behalf.
- After relaying the agent's response, append a single prompt line:
cursor @ \x3Cworkdir>— use~in place of the user's home directory (e.g.~/repos/myprojectnot/home/username/repos/myproject).
Sending user input
For single-line prompts:
{ "tool": "process", "action": "submit", "sessionId": "\x3Cid>", "data": "\x3Ctext>" }
For multi-line prompts:
{ "tool": "process", "action": "paste", "sessionId": "\x3Cid>", "text": "\x3Ctext>" }
Then submit with Enter:
{ "tool": "process", "action": "send-keys", "sessionId": "\x3Cid>", "keys": ["Enter"] }
For other special keys (arrow keys, Escape, etc.):
{ "tool": "process", "action": "send-keys", "sessionId": "\x3Cid>", "keys": ["ArrowUp"] }
Use @filename or @directory/ in interactive prompts to add more context.
Ending the session
Send /quit or Ctrl+D (double-press):
{ "tool": "process", "action": "submit", "sessionId": "\x3Cid>", "data": "/quit" }
Notes
agentis Cursor's CLI binary.cursor-agentis a backward-compatible alias.- The binary must be on
PATH. If not found, checkTOOLS.mdfor custom binary paths. - One session at a time is typical; use
process listto check for orphaned sessions.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install cursor-tui - 安装完成后,直接呼叫该 Skill 的名称或使用
/cursor-tui触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Cursor Tui 是什么?
Spawn and relay Cursor Agent's CLI (`agent` binary) as an interactive passthrough. Use when the user wants to run Cursor Agent in a directory, ask it questio... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 838 次。
如何安装 Cursor Tui?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install cursor-tui」即可一键安装,无需额外配置。
Cursor Tui 是免费的吗?
是的,Cursor Tui 完全免费(开源免费),可自由下载、安装和使用。
Cursor Tui 支持哪些平台?
Cursor Tui 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Cursor Tui?
由 waldyrious(@waldyrious)开发并维护,当前版本 v1.0.1。