← 返回
未分类 中文

Bullybuddy

BullyBuddy — Claude Code session manager CLI wrapper. Spawn, list, send input, kill, and monitor multiple Claude Code sessions via /bullybuddy slash command....
BullyBuddy — Claude Code 会话管理 CLI 工具。通过 /bullybuddy 命令生成、列出、发送输入、终止和监控多个 Claude Code会话。
chenkuansun chenkuansun 来源
未分类 clawhub v0.7.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 968
下载
💾 2
安装
1
版本
#latest

概述

BullyBuddy

Spawns and manages multiple Claude Code CLI sessions. Dual backend: tmux (default, sessions survive server restart) or node-pty (fallback). REST API, WebSocket streaming, web dashboard.

Setup

  1. Install the package globally:
npm install -g openclaw-bullybuddy
  1. Start the server:
bullybuddy server

Connection info is auto-saved to ~/.bullybuddy/connection.json on startup. The /bullybuddy command reads it automatically — no env vars needed.

For remote access, start with bullybuddy server --tunnel. The tunnel URL is available via /bullybuddy url.

/bullybuddy Slash Command

/bullybuddy status          - Server status & session summary
/bullybuddy list            - List all sessions
/bullybuddy spawn [cwd] [task] [group] - Create new session
/bullybuddy send <id> <text> - Send input to session
/bullybuddy output <id> [lines] - Show session output/transcript
/bullybuddy kill <id>       - Terminate session
/bullybuddy url             - Show dashboard URL (local + tunnel)
/bullybuddy audit [limit]   - View audit log
/bullybuddy transcript <id> [limit] - View conversation transcript
/bullybuddy help            - Show help

Security Notice

  • The auth token grants full control over all spawned Claude Code sessions, including sending arbitrary input. Treat it as a secret.
  • The /bullybuddy url command outputs the dashboard URL with the token embedded. Do not share or log this URL publicly.
  • When using --tunnel, the dashboard and API are exposed to the internet via a Cloudflare temporary URL. Anyone with the token can access all sessions remotely.
  • Spawned sessions run Claude Code with your local permissions. If --dangerously-skip-permissions is enabled, Claude can execute any command without confirmation.

Authentication

A random token is generated on each server start and saved to ~/.bullybuddy/connection.json (mode 0600). CLI and /bullybuddy auto-discover it. For the dashboard, the token is included in the URL printed on startup. The connection file is deleted on graceful shutdown.

API Overview

All endpoints require the token via Authorization: Bearer header or ?token= query parameter. All responses follow { ok: boolean, data?: T, error?: string }.

MethodEndpointDescription
-------------------------------
GET/healthServer status
GET/api/sessionsList sessions (filter by group)
POST/api/sessionsSpawn session
GET/api/sessions/:idSession detail with metrics
DELETE/api/sessions/:idKill session
POST/api/sessions/:id/inputSend input to PTY
POST/api/sessions/:id/resizeResize PTY
POST/api/sessions/:id/taskSet task metadata
POST/api/sessions/:id/muteMute notifications
POST/api/sessions/:id/unmuteUnmute notifications
GET/api/groupsGroups with session counts
GET/api/summaryAggregate state counts and groups
GET/api/browseBrowse directories (disabled by default)
GET/api/auditAudit log
GET/api/sessions/:id/transcriptConversation transcript

Spawn Request Body

{
  "name": "worker-1",
  "group": "myproject",
  "cwd": "/path/to/repo",
  "task": "Implement feature X",
  "args": ["--verbose"],
  "cols": 120,
  "rows": 40,
  "skipPermissions": false
}

All fields optional. When task is provided, it is automatically sent as input when Claude reaches the idle prompt.

Note: When sending input, terminate with \r (carriage return), not \n.

WebSocket Protocol

Connect to ws://:/ws?token=.

Client Messages

typefieldsdescription
---------------------------
subscribesessionId, cols?, rows?Receive output from session
unsubscribesessionIdStop receiving output
inputsessionId, dataSend keystrokes to PTY
resizesessionId, cols, rowsResize PTY

Server Messages

typefieldsdescription
---------------------------
sessionssessions[]Full session list (on connect)
outputsessionId, dataTerminal output chunk
scrollbacksessionId, dataBuffered scrollback on subscribe
session:createdsessionNew session spawned
session:exitedsessionId, exitCodeSession terminated
session:stateChangedsessionId, detailedStateState transition
errormessageError (e.g. invalid message)

State Detection

BullyBuddy analyzes raw PTY output to detect Claude Code's state in real-time.

detailedStateMeaning
--------------------------
startingSession just spawned, Claude loading
workingClaude is thinking/editing (spinner visible)
permission_neededClaude waiting for user approval
idleClaude at prompt, ready for input
compactingCompacting conversation history
errorError detected in output

State transitions are broadcast via WebSocket and reflected in GET /api/summary.

OpenClaw Integration

Poll GET /api/summary on an interval to check fleet status. The sessionsNeedingAttention field contains IDs of sessions in permission_needed or error state.

Remote Access

Start the server with --tunnel to create a Cloudflare temporary URL automatically:

bullybuddy server --tunnel

The tunnel URL is printed on startup and saved to ~/.bullybuddy/connection.json. Use bullybuddy url or /bullybuddy url to retrieve it anytime.

CLI Commands

bullybuddy server                          # Start server
bullybuddy server --tunnel                 # Start with Cloudflare tunnel
bullybuddy url                             # Show dashboard URL (local + tunnel)
bullybuddy spawn --name worker --group proj  # Spawn session
bullybuddy list --json                     # List sessions
bullybuddy send <id> "Fix the bug"         # Send input
bullybuddy attach <id>                     # Interactive terminal
bullybuddy kill <id>                       # Kill session
bullybuddy groups                          # List groups
bullybuddy open                            # Open dashboard

Script

When invoked, run:

{baseDir}/scripts/bullybuddy.sh $ARGUMENTS

版本历史

共 1 个版本

  • v0.7.1 当前
    2026-05-12 04:37 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,081 📥 809,926
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 676 📥 325,412
ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,226 📥 267,804