🔥 ogulcancelik/herdr:终端中的 Agent 多路复用器
英文标题:🔥 ogulcancelik/herdr
Herder 是一款终端原生的 Agent 多路复用器,能在一个终端窗口中同时运行多个编码 Agent,并通过红色/黄色/蓝色/绿色圆点直观显示阻塞、工作中、已完成或空闲状态。它基于约 10MB 的 Rust 二进制文件构建,无需 GUI 或 Electron,支持持久会话,断开连接后 Agent 仍保持运行并可通过 SSH 在任意设备上重连。与 tmux 相比,Herder 原生感知 Agent 状态,并提供工作区、标签页和窗格等灵活布局,零配置即可获得全局视图。同时,Herder 提供本地 Socket API,允许 Agent 以编程方式创建窗格、读取输出并订阅状态变更,为开发者构建 Agent 驱动的自动化工作流打开了可能。
117.8 KB
101.9 KB
中文
herdr.dev · 安装 · 快速开始 · 支持的 Agent · 文档 · Socket API · 赞助
在一个终端中运行所有编码 Agent。一眼看清哪个在阻塞、工作中或已完成。
在这些 Agent 原本运行的地方运行它们——你的机器、服务器,任何你能 SSH 的地方。每个 Agent 都获得自己的真实终端,而非应用的模拟终端,因此即使全屏 TUI 也能正确渲染。点击、拖拽、将窗格分割到工作区和标签页中,观察每个 Agent 在阻塞、工作、完成状态之间切换。合上笔记本,一切不会中断;从另一个终端重新连接,甚至通过 SSH 从手机重连。仅一个本地 Rust 二进制文件,不是应用:无 GUI、无 Electron、无仅限 Mac 的封装、无需账号、无遥测。(如果你用过 tmux:这就是为 Agent 重新打造的 tmux。)
- 每个 Agent 一个真实终端。 你看到的是每个 Agent 自己的屏幕,而非应用的模拟终端,因此即使全屏 TUI 也能正确渲染。
- Agent 状态一目了然。 侧边栏将每个 Agent 的状态汇总为 🔴 阻塞、🟡 工作中、🔵 已完成或 🟢 空闲,让你永远知道谁需要你。零配置,无需任何钩子。
- 工作区、标签页、窗格。 可按仓库或文件夹组织,全程原生鼠标操作:点击、拖拽、分割。
- 断开连接后一切照常运行。 后台服务器保持窗格和 Agent 存活;可在任意终端断开并重新连接,包括通过 SSH 从手机重连。
- 随处运行。 单一约 10MB 的 Rust 二进制文件,支持 Linux 和 macOS(Windows 测试版),无依赖,直接在你已有的终端中运行。
- 可脚本化。 提供本地 Socket API 和 CLI,Agent 可驱动调用,还支持用任意语言编写插件。
| tmux | GUI 管理器 | herdr |
|---|---|---|
| 持久会话 | ✓ | — |
| 断开/重连 | ✓ | — |
| 随处运行,通过 SSH | ✓ | — |
| 窗格、标签页、工作区 | ✓ | ✓ |
| Agent 感知 | — | ✓ |
| 驻留终端 | ✓ | — |
| 真实终端视图 | ✓ | — |
| 原生鼠标支持 | — | ✓ |
| 轻量二进制 | ✓ | — |
| Agent 可编排 | ? | ? |
tmux 提供了持久化和窗格,但它在 Agent 出现之前就已构建。它完全不知道哪个窗格是阻塞、工作中还是已完成;你可以给它挂上响铃字符和一套钩子,但每一个都得自己接线,而且仍然没有整个 Agent 编队的统一视图。GUI Agent 管理器(conductor、cmux、emdash)确实能显示 Agent 状态,这只能算是基本要求。区别在于周边的一切。它们是应用,往往仅供 Mac 使用且不开源,只是在封装器里重绘终端画面。herdr 是一个单一的二进制文件,直接在你已有的终端中运行,能在任何你能 SSH 的地方运行,并在一台服务器上展示每个 Agent 的真实屏幕,该服务器在你断开连接后保持它们存活。详见与 tmux、zellij、cmux、warp、conductor 等的完整对比。
curl -fsSL https://herdr.dev/install.sh | sh
Windows 预览测试版:
powershell -ExecutionPolicy Bypass -c "irm https://herdr.dev/install.ps1 | iex"
也可通过 brew install herdr、mise use -g herdr、nix run github:ogulcancelik/herdr 安装,或从 releases 页面获取稳定的 Linux/macOS 二进制文件。
herdr update 可升级由安装器管理的实例;Homebrew、mise 和 Nix 则通过各自的包管理器更新。频道、预览版、重启及恢复等详情见安装文档。
herdr 会启动或连接至后台服务器并打开一个工作区。在窗格中运行 Agent。
herdr 原生支持鼠标操作,点击、拖拽窗格、标签页和分割边框无需任何快捷键即可完成所有操作。对于键盘用户,ctrl+b 是前缀键:按下并松开,再按操作键,例如 ctrl+b 后按 c 创建标签页。仅保留一个键位,使 herdr 不会与你的 shell 冲突。
ctrl+b然后按shift+n创建新工作区ctrl+b然后按v或-分割窗格ctrl+b然后按c创建新标签页ctrl+b然后按w切换工作区ctrl+b然后按q断开连接;Agent 继续运行,再次执行herdr即可重连
按下 ctrl+b 然后按 ? 可查看所有按键绑定。键盘指南解释了前缀模型及如何去掉前缀;完整的键位映射、复制模式及配置语法见配置文档。
将 herdr 部署到 VPS 上,然后从本地终端访问。herdr --remote 会让你的本地终端成为远程服务器的客户端,这样向 Agent 粘贴图片等功能依然可用,而这正是纯 ssh + tmux 会出问题的地方。
herdr --remote workbox herdr --remote ssh://you@yourserver:2222
参见持久化与远程文档了解命名会话、保活、直接连接和会话交接。
检测通过进程名匹配与终端输出启发式算法开箱即用。
已检测但未全面测试:gemini cli、cline。其他任何 Agent 仍可正常工作;herdr 将其作为终端多路复用器运行,自定义集成可通过 Socket API 上报标签和状态。
官方集成添加原生会话恢复,部分还能直接上报语义状态。使用 herdr integration install <agent> 安装,适用于 pi、omp、claude、codex、copilot、devin、droid、kimi、opencode、kilo、hermes、qodercli 和 cursor。参见集成文档。
本地 Unix Socket 允许 Agent 创建工作区、分割或最大化窗格、生成辅助进程、读取输出并订阅状态变更,无需轮询。使用以下命令安装可复用技能:
npx skills add ogulcancelik/herdr --skill herdr -g
从 Agent 技能文档、Socket API 文档 和 SKILL.md 开始。
- 快速开始:首次会话、窗格、复制和命名会话
- 概念:服务器与客户端、工作区、标签页和窗格
- 安装:安装、更新、频道、Homebrew、mise 和 Nix
- 会话状态:断开连接、重启恢复、Agent 恢复和实时交接
- 配置:按键绑定、复制模式、主题、通知、环境变量
- 集成:按 Agent 的原生会话恢复和语义状态
- Socket API:Socket 协议和 CLI 参考
SKILL.md:可复用的 Agent 技能
如果你是一个协助此仓库的 AI Agent,在进行更改前请阅读 AGENTS.md,在提交 Issue 或 PR 前请阅读 CONTRIBUTING.md。
git clone https://github.com/ogulcancelik/herdr cd herdr cargo build --release ./target/release/herdr
just test # 单元测试 just check # 格式化、测试和维护检查
赞助
herdr 全职公开构建,背后没有任何收入。赞助直接用于支持开发、稳定性和通往真正 Agent 运行时的道路。
→ 成为赞助者 · 企业/合作:hey@herdr.dev · 赞助层级详见 SPONSORS.md。感谢 🐑
Herdr 采用双许可证:
- 开源:GNU Affero General Public License v3.0 或更高版本 (AGPL-3.0-or-later)。
- 商业许可:针对无法遵守 AGPL 的组织提供商业许可。
English / 原文
herdr.dev · install · quick start · supported agents · docs · socket api · sponsor
v.0.4.0.mp4
run all your coding agents in one terminal. see who's blocked, working, or done at a glance.
run your agents where they already run; your machine, a server, anywhere you can ssh. each one gets its own real terminal, not an app's imitation of one, so even full-screen TUIs render right. click, drag, and split panes into workspaces and tabs, and watch each agent go blocked, working, done. close the laptop and nothing dies; reattach from another terminal, or from your phone over ssh. one local rust binary, not an app: no gui, no electron, no mac-only wrapper, no account, no telemetry. (if you've used tmux: it's that, rebuilt for agents.)
- a real terminal per agent. you see each agent's own screen, not an app's imitation of one, so even full-screen TUIs render right.
- agent state at a glance. the sidebar rolls every agent up to 🔴 blocked, 🟡 working, 🔵 done, or 🟢 idle, so you always know who needs you. zero config, no hooks required.
- workspaces, tabs, panes. organize by repo or folder, click, drag, and split, mouse-native throughout.
- nothing dies on detach. a background server keeps panes and agents alive; detach and reattach from any terminal, including your phone over ssh.
- runs anywhere. single ~10MB rust binary, linux and macos (windows beta), no dependencies, runs inside the terminal you already use.
- scriptable. a local socket api and cli that agents can drive, plus plugins you can write in any language.
| tmux | gui managers | herdr
---|---|---|---
persistent sessions | ✓ | — | ✓
detach / reattach | ✓ | — | ✓
runs anywhere, over ssh | ✓ | — | ✓
panes, tabs, workspaces | ✓ | ✓ | ✓
agent awareness | — | ✓ | ✓
lives in your terminal | ✓ | — | ✓
real terminal views | ✓ | — | ✓
mouse-native | — | ✓ | ✓
lightweight binary | ✓ | — | ✓
agents can orchestrate | ? | ? | ✓
tmux gives you persistence and panes, but it was built before agents existed. it has no idea which pane is blocked, working, or done; you can bolt a bell character and per-harness hooks onto it, but you wire each one yourself and still have no shared view of the fleet. the gui agent managers (conductor, cmux, emdash) do show agent state, so call that table stakes. the difference is everything around it. they are apps, often mac-only and closed, that redraw the terminal inside a wrapper. herdr is a single binary that runs in the terminal you already use, anywhere you can ssh, and shows each agent's real screen on a server that keeps it alive when you disconnect. see the full comparison with tmux, zellij, cmux, warp, conductor, and more.
curl -fsSL https://herdr.dev/install.sh | sh
windows preview beta:
powershell -ExecutionPolicy Bypass -c "irm https://herdr.dev/install.ps1 | iex"
also available with brew install herdr, mise use -g herdr, nix run github:ogulcancelik/herdr, or as a stable Linux/macOS binary from releases.
herdr update upgrades an installer-managed install; Homebrew, mise, and Nix update through their own package managers. channel, preview, restart, and restore details are in the install docs.
herdr starts or attaches to a background server and opens a workspace. run an agent in the pane.
herdr is mouse-native, so clicking and dragging panes, tabs, and split borders gets you everywhere without a single keybinding. for the keyboard, ctrl+b is the prefix: press it, release, then press the action key, so ctrl+b then c makes a tab. one reserved key keeps herdr out of your shell's way.
ctrl+bthenshift+nfor a new workspacectrl+bthenvorminusto split panesctrl+bthencfor a new tabctrl+bthenwto switch workspacesctrl+bthenqto detach; agents keep running, runherdragain to reattach
press ctrl+b then ? for every binding. the keyboard guide explains the prefix model and how to go prefix-free; the full keymap, copy mode, and config syntax live in the configuration docs.
run herdr on a VPS and reach it from your local terminal. herdr --remote makes your local terminal the client of the remote server, so pasting images into your agents keeps working, the thing plain ssh + tmux breaks.
herdr --remote workbox
herdr --remote ssh://you@yourserver:2222
see the persistence and remote docs for named sessions, keepalives, direct attach, and handoff.
detection works out of the box with process-name matching plus terminal-output heuristics.
detected but not fully tested: gemini cli, cline. any other agent still works; herdr runs it as a terminal multiplexer, and custom integrations can report labels and state over the socket api.
official integrations add native session restore, and some report semantic state directly. install one with herdr integration install <agent>, available for pi, omp, claude, codex, copilot, devin, droid, kimi, opencode, kilo, hermes, qodercli, and cursor. see the integrations docs.
the local Unix socket lets agents create workspaces, split or zoom panes, spawn helpers, read output, and subscribe to state changes instead of polling. install the reusable skill with:
npx skills add ogulcancelik/herdr --skill herdr -g
start with the agent skill docs, socket API docs, and SKILL.md.
- quick start: first session, panes, copy, and named sessions
- concepts: server and client, workspaces, tabs, and panes
- install: install, update, channels, Homebrew, mise, and Nix
- session state: detach, restart restore, agent restore, and live handoff
- configuration: keybindings, copy mode, themes, notifications, environment variables
- integrations: native session restore and semantic state per agent
- socket api: socket protocol and cli reference
SKILL.md: reusable agent skill
if you are an ai agent helping with this repository, read AGENTS.md before making changes and read CONTRIBUTING.md before opening issues or PRs.
git clone https://github.com/ogulcancelik/herdr
cd herdr
cargo build --release
./target/release/herdr
just test # unit tests
just check # formatting, tests, and maintenance checks
sponsors
herdr is built full-time, in the open, with no revenue behind it. sponsoring directly funds development, stability, and the path to a real agent runtime.
→ become a sponsor · enterprise / partnership: hey@herdr.dev · see SPONSORS.md for tiers. thank you 🐑
Herdr is dual-licensed:
- Open source: GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).
- Commercial: commercial licenses are available for organizations that cannot comply with AGPL.
Contact: hey@herdr.dev
