Show HN:Thurbox——基于 tmux 的本地 AI Agent 编排 TUI 与 CLI
英文标题:🔶 Show HN: Thurbox – A tmux-based TUI and CLI for local AI agent orchestration
Thurbox 是一款基于 tmux 的终端工具,可在同一终端并行运行 Claude Code、Codex、Antigravity、opencode、aider 等多个编程 Agent。每个 Agent 都拥有独立的持久化 tmux 会话和 Git worktree,因此可避免相互争抢工作目录,并能在崩溃、重启乃至系统重启后继续运行。该工具采用 Agent 中立设计,直接启动原厂 CLI,同时允许用户通过 Lua 文件自定义整个界面。对开发者而言,Thurbox 还提供无头 CLI、远程 SSH/WSL 会话、自动化任务、跨会话消息及多仓库编排能力,适用于并行开发与 Agent 协作工作流。
1.4 MB
674.6 KB
1.1 MB
中文
在同一个终端中并排同时运行多个编程 Agent——Claude Code、Codex、Antigravity、opencode、aider,或任意由你自行定义的 CLI。每个 Agent 都拥有自己的持久化 tmux 会话和独立的 git worktree,因此不会争抢你的检出目录,并且能在崩溃、重启和系统重启后存活。退出 thurbox 后,每个 Agent 都会继续工作;重新启动时,它们仍会保留在那里。
Thurbox 与 Agent 无关。它会原样启动厂商 CLI,不了解其模型、提示词或工具,因此 CLI 一经发布新功能,你当天就能使用。界面也不是编译进程序中的:你所看到的每个窗格,包括会话列表,都是你自己目录中的一个 Lua 文件——你可以移动、关闭、重写它,或安装其他人编写的版本。
Linux / macOS:
curl -fsSL https://raw.githubusercontent.com/Thurbeen/thurbox/main/scripts/install.sh | sh
Windows(PowerShell):
irm https://raw.githubusercontent.com/Thurbeen/thurbox/main/scripts/install.ps1 | iex
这会安装两个二进制文件——thurbox(TUI)和 thurbox-cli(无头版本)——并进行校验和验证与平台自动检测。
你还需要 tmux ≥ 3.2(原生 Windows 上可使用 psmux)、git,以及至少一个编程 Agent CLI。
Homebrew、AUR、winget、Chocolatey、从源码构建、固定版本、修改安装目录及卸载方式,均可参阅安装页面。
首次启动会初始化 ~/.config/thurbox/——其中包含 thurbox 已知的 Agent、主题以及界面本身——随后在左侧绘制会话列表、在右侧显示 Agent 终端。
Ctrl+N打开仓库选择器。按Space切换仓库选择状态,按w将其设为 worktree 模式(系统会要求你指定基础分支和新分支名称),按Enter确认。为会话命名,然后选择一个 Agent。- **与它交谈。**右侧窗格是实时的 Agent CLI;每一次按键都会发送给它。
- 再次按
Ctrl+N,即可在第二个分支上启动第二个 Agent。使用Ctrl+J/Ctrl+K在会话间切换——未查看的会话仍会继续工作。 Ctrl+Q离开 TUI,但不会终止任何内容。再次运行thurbox后,两个 Agent 仍会处于任务进行中;也可以通过tmux -L thurbox attach直接连接原始 tmux 会话。
这就是产品的全部核心流程,分为四步:即使你停止关注,并行工作仍会持续进行。
F1 会列出所有按键,并根据实时注册表渲染,因此不会与实际运行内容脱节;Ctrl+P 则是在同一组操作之上的命令面板。如需查看带截图的相同流程,请参阅教程。
- 全局搜索(
Ctrl+/)——可按名称、Agent、分支或仓库查找会话,也可按其屏幕上的文本查找;后一种方式可通过其中的错误信息找到目标会话。 - 分叉与主从树(
Ctrl+F)——可分叉一段对话;子会话嵌套在其主会话之下。 - Worktree 与多仓库会话——一个会话可以跨越多个仓库,每个仓库都位于共享分支的独立 worktree 中。
Ctrl+S可将它们与基础分支同步。 - 远程 SSH 与 WSL 会话——在
hosts.toml中声明主机后,会话将在远端运行,而 TUI 保持在本地。 - 无头 CLI——
thurbox-cli可通过脚本创建、驱动、捕获及销毁会话,并使用与 TUI 读取相同的数据库。 - 自动化与任务——包括定时运行 Agent,以及可交给 Agent 处理的待办事项列表。无论 thurbox 是否打开,tmux 心跳机制都会触发它们。
- 跨会话消息——一个与 Agent 无关的邮箱机制,让一个 Agent 向另一个 Agent 交付载荷,而不是抓取其终端内容。
- 扩展——需要显式启用的附加组件,属于数据而非代码:一个清单文件声明其所需的 Agent、文件、会话和自动化任务,一条命令即可安装并自动修复它们。
- 会话生命周期钩子、操作系统通知、36 个主题(
Ctrl+Y)以及完整的鼠标支持。
通过一个脚本同时连接一组 Agent——运营人员、开发者、审查者——可参考单体仓库方案。
该二进制程序启动一个内核,读取一个目录,并绘制其中找到的任意 Lua 界面。窗格位于 ui/plugins/*.lua,布局位于 ui/layout.lua,按 F10 可从磁盘重新加载两者。Agent、主机、钩子、主题、组合键和设置分别以文件形式存放在 ~/.config/thurbox/ 下。
你不必为此学习 Lua。Thurbox 自带 ui-skill 扩展,可向你正在运行的任意 CLI 讲解界面的构成方式,因此你可以直接在任意会话内提出要求:
在左侧添加一个显示 CPU 和 RAM 使用率的窗格。将搜索栏移至底部,并将会话列宽度设为 30%。
按下 F10,修改就会出现在屏幕上。如果某个窗格损坏,Ctrl+, 后的 ] 是界面框架而非窗格,因此无法被编辑掉——按 r 可恢复随附的文件,按 space 可关闭你自己的版本。
thurbox.thurbeen.eu/docs 是使用手册,涵盖:安装、教程、功能、快捷键、配置、Agent、界面、编排、架构、与类似工具的比较以及FAQ。
这些设计决策背后的依据位于本仓库的 docs/ 目录下,包括:CONSTITUTION(不可妥协的原则)、ARCHITECTURE、FEATURES、CONFIG、V2-KERNEL、PLUGINS、ORCHESTRATION、DEVELOPMENT 和 RELEASING。
CONTRIBUTING.md 是完整指南——包括 Nix 开发 shell、just 任务、测试规范,以及决定发布内容的 conventional-commit 规则。
git clone https://github.com/Thurbeen/thurbox.git
cd thurbox
nix develop # or ./scripts/install-dev-tools.sh
just build && just test && just lint
社区
- Discord——提问、安装帮助,以及展示你的界面。请在
#help中提问,每个问题使用一个单独的讨论串。 - GitHub Issues——用于已确认的 Bug 和明确的功能请求。
English / 原文
Run several coding agents at once — Claude Code, Codex, Antigravity, opencode, aider, or any CLI you describe yourself — side by side in one terminal. Each gets its own persistent tmux session and its own git worktree, so they never fight over your checkout, and they survive crashes, restarts and reboots. Quit thurbox and every agent keeps working; relaunch and they are all still there.
Thurbox is agent-neutral. It launches the vendor CLI unmodified and knows nothing about its model, prompts or tools, so you get new agent features the day the CLI ships them. And the interface is not compiled in: every pane you see, the session list included, is a Lua file in a directory you own — move it, turn it off, rewrite it, or install one somebody else wrote.
Linux / macOS:
curl -fsSL https://raw.githubusercontent.com/Thurbeen/thurbox/main/scripts/install.sh | sh
Windows (PowerShell):
irm https://raw.githubusercontent.com/Thurbeen/thurbox/main/scripts/install.ps1 | iex
That installs both binaries — thurbox (the TUI) and thurbox-cli (the headless one) — with checksum verification and platform auto-detection.
You also need tmux ≥ 3.2 (or psmux on native Windows), git , and at least one coding-agent CLI.
Homebrew, the AUR, winget, Chocolatey, building from source, pinning a version, changing the install directory and uninstalling are all on the Installation page.
First launch seeds ~/.config/thurbox/ — the agents thurbox knows, the themes, and the interface itself — then draws a session list on the left and an agent terminal on the right.
Ctrl+Nopens the repo picker.Spacetoggles a repo,wputs it in worktree mode (you are asked for a base branch and a new branch name),Enterconfirms. Name the session, then pick an agent.- Talk to it. The right pane is a live agent CLI; every key goes to it.
Ctrl+Nagain for a second agent on a second branch.Ctrl+J/Ctrl+Kmove between sessions — the one you are not looking at keeps working.Ctrl+Qleaves the TUI without killing anything. Runthurboxagain and both agents are still mid-task, or attach raw withtmux -L thurbox attach.
That is the whole product in four steps: parallel work that keeps going when you stop watching it.
F1 lists every key and is rendered from the live registry, so it cannot drift from what is running; Ctrl+P is a command palette over the same actions. For the same walkthrough with screenshots, see the tutorial.
- Global search (
Ctrl+/) — find a session by name, agent, branch or repo, and by the text on its screen, which is the half that finds it by the error in it. - Fork and lead/worker trees (
Ctrl+F) — branch a conversation; children nest under their lead. - Worktrees and multi-repo sessions — one session can span several repos, each on its own worktree of a shared branch.
Ctrl+Ssyncs them with their base. - Remote SSH and WSL sessions — declare hosts in
hosts.tomland sessions run there while the TUI stays local. - A headless CLI —
thurbox-clicreates, drives, captures and tears down sessions from a script, over the same database the TUI is reading. - Automations and tasks — scheduled agent runs and a todo list whose items can be handed to an agent. A tmux heartbeat fires them whether or not thurbox is open.
- Inter-session messages — an agent-neutral mailbox so one agent hands another a payload instead of scraping its terminal.
- Extensions — opt-in add-ons that are data, not code: a manifest declares the agents, files, sessions and automations it wants, and one command installs and self-heals them.
- Session lifecycle hooks , OS notifications , 36 themes (
Ctrl+Y) and full mouse support.
Wiring a fleet of agents at once — operators, developers, reviewers, from one script — is the monorepo recipe.
The binary boots a kernel, reads a directory, and draws whatever Lua it finds there. Panes live in ui/plugins/*.lua, the arrangement in ui/layout.lua, and F10 reloads both from disk. Agents, hosts, hooks, themes, chords and settings are each a file under ~/.config/thurbox/.
You do not have to learn Lua for any of it. Thurbox ships a built-in ui-skill extension that teaches whichever CLI you run how the interface is put together, so from inside any session you can just ask:
Add a pane on the left with CPU and RAM usage. Move the search strip to the bottom and make the session column 30% wide.
Press F10 and the change is on your screen. If a pane breaks, Ctrl+, then ] is chrome rather than a pane, so it cannot be edited away — r restores a shipped file, space turns yours off.
The Interface → · Writing a pane → · Configuration →
thurbox.thurbeen.eu/docs is the manual: installation, tutorial, features, keybindings, configuration, agents, the interface, orchestration, architecture, a comparison with similar tools and an FAQ.
The rationale behind the decisions is in this repository, under docs/: CONSTITUTION (non-negotiable principles), ARCHITECTURE, FEATURES, CONFIG, V2-KERNEL, PLUGINS, ORCHESTRATION, DEVELOPMENT and RELEASING.
CONTRIBUTING.md is the full guide — the Nix dev shell, the just tasks, the test discipline, and the conventional-commit rules that decide what gets released.
git clone https://github.com/Thurbeen/thurbox.git
cd thurbox
nix develop # or ./scripts/install-dev-tools.sh
just build && just test && just lint
Community
- Discord — questions, setup help, and showing off your interface. Ask in
#help, one thread per problem. - GitHub Issues — confirmed bugs and concrete feature requests.
MIT — see LICENSE. Built on ratatui, tui-term, vt100 and tmux.


