langlanglanglanglang

Tui Agent Hud — Development skill for Claude Code

Development community

给 Claude Code / Codex 多窗口用的去中心化 tmux 状态 HUD —— 每个窗口 🟢🟡🔴 红绿灯 + 底栏任务概览.

How to install Tui Agent Hud

This entry records only its repository, not the path inside it, so there is no exact command to give. Open langlanglanglanglang/tui-agent-hud and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Tui Agent Hud does

给 Claude Code / Codex 多窗口用的去中心化 tmux 状态 HUD —— 每个窗口 🟢🟡🔴 红绿灯 + 底栏任务概览。零 token、极低资源、自监听、cc/codex 通用。

Alternatives in Development

  • Check 1: Cache Exists? — CLAUDE_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}" CACHE_EXISTS=$(ls -d "$CLAUDE_DIR/plugins/cache/claude-hud" 2 10.9k ★
  • Agent Of Empires — Manage multiple Claude Code, OpenCode agents from either TUI or Web for easy access on mobile 3.1k ★
  • Claude Canvas — A TUI toolkit that gives Claude Code its own display 1.4k ★

README

tui-agent-hud

给 tmux 里的 **Claude Code / Codex 多窗口**加一层轻量 HUD:

  • 窗口名红绿灯 — 每个窗一眼看出 🟢在跑 / 🟡等你输入 / 🔴卡住需处理
  • 底栏任务详情 — 当前窗仅显示 resolve OAuth redirect loop(真实标题)

配合多开 cc/codex 跑并行任务时,一眼看清哪个窗在忙、哪个在等你。

┌─ tmux tab ────────────────────────────────┐
│ 🟢 build-api   🟡 fix-login   🔴 run-tests │   ← 窗口名红绿灯(agent-watch 维护)
└────────────────────────────────────────────┘
 ...
 resolve OAuth redirect loop                   14:32   ← 底栏详情(agent-hud-title)

设计:去中心化自监听

每个 cc/codex 窗口**旁挂一个 `agent-watch`,只盯自己这一个 pane**:

  • capture 自己 → 判红绿灯 → rename 自己的窗
  • 自己的窗口关闭 → watcher 自动退出;同一 pane 使用原子锁,始终只有一个 watcher

没有集中轮询器,所以:

集中式轮询器 tui-agent-hud(自监听)
抢名冲突 轮询器 vs 子进程可能抢 ✅ 每个只改自己的窗名,零冲突
生命周期 需管进程 + 防孤儿 ✅ 绑自己的窗,窗关即退
跨 session 需每 session 起一个 ✅ 不存在——每个只认自己的 pane
cc / codex ✅ 都兼容(自动识别)

底栏详情由 tmux 内建 `status-right` 每 5s 渲染,无独立进程。红绿灯和任务编号只保留在窗口标签中,底栏不重复展示。

安装

一键安装(推荐)

复制下面整段执行。首次运行会克隆到 `~/tui-agent-hud`,重复运行会先以 `--ff-only` 更新,再重新执行幂等安装:

bash -c '
set -e
repo="https://github.com/langlanglanglanglang/tui-agent-hud.git"
install_dir="${TUI_AGENT_HUD_DIR:-$HOME/tui-agent-hud}"

if [ -d "$install_dir/.git" ]; then
  git -C "$install_dir" pull --ff-only
elif [ -e "$install_dir" ]; then
  echo "安装目录已存在且不是 Git 仓库:$install_dir" >&2
  exit 1
else
  git clone "$repo" "$install_dir"
fi

"$install_dir/install.sh"
'

安装完成后重开 shell,或按脚本最后的提示 `source` 当前 shell profile。 如需自定义安装目录,可在命令前设置 `TUI_AGENT_HUD_DIR=/path/to/tui-agent-hud`。

手动安装

git clone https://github.com/langlanglanglanglang/tui-agent-hud.git ~/tui-agent-hud
cd ~/tui-agent-hud
./install.sh
source ~/.zshrc     # 或重开 shell

`install.sh` 会(幂等,用块标记,可重复跑):

  1. ~/.tmux.conf 写底栏配置(status-rightagent-hud-title + status-interval 5
  2. 往 shell profile 写 claude / codex wrapper —— 启动时后台挂一个只盯本窗的 agent-watch
  3. ~/.tmux.conf 写 tmux hook(新窗 / 切窗 / 聚焦时兜底挂 watcher)—— 覆盖 wrapper 之外的启动方式(IDE 插件、绝对路径等);watcher 用原子锁保证每个 pane