OA0 = Omni AI 0
OA0 是一个探索 AI 的论坛
现在注册
已注册用户请  登录
OA0  ›  技能包  ›  vibetunnel:管理 VibeTunnel 终端会话的工具

vibetunnel:管理 VibeTunnel 终端会话的工具

 
  client ·  2026-02-15 23:40:16 · 3 次点击  · 0 条评论  

名称: vibetunnel
描述: 管理 VibeTunnel 终端会话。创建、列出、监控和控制 VibeTunnel 网页仪表板中可见的终端会话。
主页: https://github.com/AugmentedMomentum/vibetunnel
元数据: {"clawdbot":{"emoji":"🖥️","requires":{"bins":["vibetunnel","curl","jq"]},"primaryEnv":"VT_URL","install":[{"id":"vibetunnel","kind":"node","package":"vibetunnel","bins":["vibetunnel"],"label":"安装 VibeTunnel (npm)"}]}}


VibeTunnel

通过 REST API 管理 VibeTunnel 终端会话。可创建、列出、监控和控制网页仪表板中显示的会话。

环境准备

VibeTunnel 服务必须正在运行。默认地址为 http://localhost:8080。可通过 VT_URL 环境变量覆盖此设置。

健康检查

curl -s ${VT_URL:-http://localhost:8080}/api/health | jq .

列出会话

curl -s ${VT_URL:-http://localhost:8080}/api/sessions | jq .

简洁视图:

curl -s ${VT_URL:-http://localhost:8080}/api/sessions | jq -r '.[] | "\(.status | if . == "running" then "●" else "○" end) \(.name) [\(.id | .[0:8])]"'

创建会话

curl -s -X POST ${VT_URL:-http://localhost:8080}/api/sessions \
  -H "Content-Type: application/json" \
  -d '{"command": ["zsh", "-l", "-i"], "name": "my-session", "workingDir": "/path/to/dir"}' | jq .

参数说明:
- command: 数组 — 命令及其参数(默认:["zsh", "-l", "-i"]
- name: 字符串 — 显示名称
- workingDir: 字符串 — 工作目录
- cols: 数字 — 终端宽度(默认:120)
- rows: 数字 — 终端高度(默认:30)

获取会话详情

curl -s ${VT_URL:-http://localhost:8080}/api/sessions/<id> | jq .

删除会话

curl -s -X DELETE ${VT_URL:-http://localhost:8080}/api/sessions/<id> | jq .

发送输入

curl -s -X POST ${VT_URL:-http://localhost:8080}/api/sessions/<id>/input \
  -H "Content-Type: application/json" \
  -d '{"text": "ls -la\n"}' | jq .

注意:需包含 \n 来执行命令。

调整会话尺寸

curl -s -X POST ${VT_URL:-http://localhost:8080}/api/sessions/<id>/resize \
  -H "Content-Type: application/json" \
  -d '{"cols": 150, "rows": 40}' | jq .

使用示例

启动 Claude Code 会话:

curl -s -X POST ${VT_URL:-http://localhost:8080}/api/sessions \
  -H "Content-Type: application/json" \
  -d '{"command": ["claude"], "name": "claude-code", "workingDir": "~/repos/my-project"}' | jq .

启动 tmux 会话:

curl -s -X POST ${VT_URL:-http://localhost:8080}/api/sessions \
  -H "Content-Type: application/json" \
  -d '{"command": ["tmux", "new", "-A", "-s", "work"], "name": "tmux-work"}' | jq .

清理已退出的会话:

curl -s ${VT_URL:-http://localhost:8080}/api/sessions | jq -r '.[] | select(.status == "exited") | .id' | \
  xargs -I {} curl -s -X DELETE ${VT_URL:-http://localhost:8080}/api/sessions/{}

环境变量

变量名 默认值 描述
VT_URL http://localhost:8080 VibeTunnel 服务器地址
3 次点击  ∙  0 人收藏  
登录后收藏  
目前尚无回复
0 条回复
About   ·   Help   ·    
OA0 - Omni AI 0 一个探索 AI 的社区
沪ICP备2024103595号-2
Developed with Cursor