# Show HN： Claudraband - 面向高级用户的 Claude 代码

- 来源：Hacker News 热门（buzzing.cc 中文翻译）
- 作者：halfwhey
- 发布时间：2026-04-13 12:03
- AIHOT 链接：https://aihot.virxact.com/items/cmnwp5o2c01d9sl6xduez32up
- 原文链接：https://github.com/halfwhey/claudraband

## AI 摘要

Claudraband 是专为高级用户设计的 Claude Code 增强工具，针对专业开发者优化，已开源至 GitHub。

## 正文

Claudraband

Claude Code for the power user

Experimental: this project is still evolving as Claude Code and ACP clients change.

Experimental: this project is still evolving as Claude Code and ACP clients change.

CLI • Library • Daemon API • Docker • Examples

claudraband wraps the official Claude Code TUI in a controlled terminal so you can keep sessions alive, resume them later, answer pending prompts, expose them through a daemon, or drive them through ACP.

claudraband

It provides:

Resumable non-interactive workflows. Essentially claude -p with session support: cband prompt --session 'what was the result of the research?'

claude -p

cband prompt --session 'what was the result of the research?'

An HTTP daemon for remote or headless session control

An ACP server for editor and alternate frontend integration

A TypeScript library for building these workflows into your own tools

Caveats

This is not a replacement for the Claude SDK. It is geared toward personal, ad-hoc usage.

We do not touch OAuth and we do not bypass the Claude Code TUI. You must authenticate through Claude Code, and every interaction runs through a real Claude Code session.

Setup

Requirements:

Node.js or Bun

An already authenticated Claude Code

tmux for the first-class local and daemon-backed workflow

tmux

Install or run:

# one-off npx @halfwhey/claudraband "review the staged diff" bunx @halfwhey/claudraband "review the staged diff" # install once npm install -g @halfwhey/claudraband

The package installs both claudraband and cband. cband is the recommended shorthand. The package bundles Claude Code @anthropic-ai/claude-code@2.1.96; set CLAUDRABAND_CLAUDE_PATH if you need to override the binary.

claudraband

cband

cband

@anthropic-ai/claude-code@2.1.96

CLAUDRABAND_CLAUDE_PATH

Docker:

mkdir -p "$PWD/claude-account" # one-time onboarding for the mounted Claude account bundle docker run --rm -it \ -v "$PWD/claude-account:/claude-account" \ ghcr.io/halfwhey/claudraband:latest claude # start the daemon with the same mounted account bundle docker run --rm -d --name claudraband \ -p 7842:7842 \ -v "$PWD/claude-account:/claude-account" \ ghcr.io/halfwhey/claudraband:latest serve cband --connect localhost:7842 "hello from docker"

If Claude starts on a native startup permission prompt, answer it with cband prompt --session --select . For more container details, see docs/docker.md.

cband prompt --session --select

Quick Start

The two first-class paths are local tmux sessions and daemon-backed sessions.

tmux

Local persistent sessions

cband "audit the last commit and tell me what looks risky" cband sessions cband prompt --session "keep going" cband prompt --session --select 2 cband watch --session cband interrupt --session

Daemon-backed sessions

cband serve --host 127.0.0.1 --port 7842 cband --connect localhost:7842 "start a migration plan" cband attach cband prompt --session --select 2

The daemon defaults to using tmux as the terminal runtime, just like the local path. Use --connect only when creating a new daemon-backed session; after that, prompt, send, watch, interrupt, attach, and sessions route through the recorded live owner automatically.

tmux

--connect

prompt

send

watch

interrupt

attach

sessions

Experimental xterm.js Backend

--backend xterm exists for local or daemon use, but it is experimental and slower than tmux. Use it when you need a headless fallback, not as the default path for long-lived interactive work. See docs/cli.md for current caveats and backend behavior.

--backend xterm

tmux

ACP

Use ACP when another tool wants to drive Claude through claudraband.

claudraband

cband acp --model opus # example: toad uvx --from batrachian-toad toad acp 'cband acp -c "--model haiku"'

Editor and ACP client support varies by frontend, but claudraband itself supports session follow and resume through ACP.

claudraband

Session Model

Live sessions are tracked in ~/.claudraband/.

~/.claudraband/

cband sessions lists live tracked sessions

cband sessions

prompt --session and send --session auto-resume a saved session, even when it is no longer live

prompt --session

send --session

watch, interrupt, status, last target a session by id

watch

interrupt

status

last

attach only works on live sessions

attach

sessions close ... closes live tracked sessions, either local or daemon-backed

sessions close ...

Examples

Self-interrogation

Claude can interrogate an older Claude session and justify the choices it made.

Toad via ACP

Toad can use claudraband acp as an alternative frontend for Claude Code.

claudraband acp

That UI is still backed by a real Claude Code pane underneath.

Zed via ACP

Zed can also use claudraband acp as an alternative frontend.

claudraband acp

Library

Runnable TypeScript examples live in examples/:

examples/

examples/code-review.ts

examples/code-review.ts

examples/multi-session.ts

examples/multi-session.ts

examples/session-journal.ts

examples/session-journal.ts

For the full API, see docs/library.md. For CLI details, see docs/cli.md. For raw daemon endpoints, see docs/daemon-api.md.

Cheat Sheet

# install or run once npx @halfwhey/claudraband "review the staged diff" bunx @halfwhey/claudraband "review the staged diff" npm install -g @halfwhey/claudraband # local persistent sessions cband "audit the last commit" cband sessions cband sessions close --all # close all claudraband controlled sessions cband prompt --session "keep going" cband send --session "fire and forget" cband watch --session cband interrupt --session cband status --session cband last --session # answer pending prompts cband prompt --session --select 2 cband prompt --session --select 3 "xyz" # daemon mode cband serve --host 127.0.0.1 --port 7842 cband --connect localhost:7842 "start a migration plan" cband attach # ACP cband acp --model opus
