tmuxx
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesetmuxx
tmuxx
Use this skill to control tmux and worktree-based agent tasks through .
tmuxx agent通过使用此工具来控制tmux和基于工作树的Agent任务。
tmuxx agentHard Rules
硬性规则
- Prefer for session/window/worktree management. If pane command passthrough fails on a target environment, fall back to raw
tmuxx agentfor shell builtins.tmux send-keys - Always pass so outputs are machine-parseable.
--json - Prefer deterministic workflow commands over low-level primitives:
start-tasktask-reportcomplete-taskabort-task
- Only use low-level commands (,
split-pane, etc.) when workflow commands cannot solve the request.send-command
- 优先使用进行会话/窗口/工作树管理。如果在目标环境中窗格命令传递失败,则退回到原生
tmuxx agent来处理Shell内置命令。tmux send-keys - 始终传递参数,确保输出可被机器解析。
--json - 优先使用确定性工作流命令而非底层原语:
start-tasktask-reportcomplete-taskabort-task
- 仅当工作流命令无法满足需求时,才使用底层命令(、
split-pane等)。send-command
Standard Workflow
标准工作流
1) Start task
1) 启动任务
bash
tmuxx agent start-task <session_name> "<task prompt>" --jsonOptional:
--branch <name>--base-branch <branch>- (or other compatible command)
--agent-command "claude -p"
bash
tmuxx agent start-task <session_name> "<task prompt>" --json可选参数:
--branch <name>--base-branch <branch>- (或其他兼容命令)
--agent-command "claude -p"
Setup Workspace (common first operation)
配置工作区(常见初始操作)
bash
tmuxx agent create-session dev --json
tmuxx agent create-window dev --name editor --json
tmuxx agent create-window dev --name logs --json
tmuxx agent list-sessions --jsonbash
tmuxx agent create-session dev --json
tmuxx agent create-window dev --name editor --json
tmuxx agent create-window dev --name logs --json
tmuxx agent list-sessions --json2) Monitor task — with pane-level insights
2) 监控任务 — 含窗格级洞察
bash
tmuxx agent task-report <branch> --json
tmuxx agent list-worktrees --json
tmuxx agent list-sessions --jsontask-report- : "idle", "running", "waiting_for_input", "error"
pane_details[].status - : True if pane is waiting for user input/approval (permission request, confirmation, etc.)
pane_details[].needs_prompt - : Which window the pane is in
pane_details[].window_name - : What command is running
pane_details[].command
list-sessions- Which panes are actively running
- Which are idle
- Which are waiting for user input (permission wall, approval prompt, etc.)
bash
tmuxx agent task-report <branch> --json
tmuxx agent list-worktrees --json
tmuxx agent list-sessions --jsontask-report- : "idle"(空闲)、"running"(运行中)、"waiting_for_input"(等待输入)、"error"(错误)
pane_details[].status - : 若窗格正在等待用户输入/确认(权限请求、确认操作等),则为True
pane_details[].needs_prompt - : 窗格所在的窗口名称
pane_details[].window_name - : 当前运行的命令
pane_details[].command
list-sessions- 哪些窗格正在活跃运行
- 哪些处于空闲状态
- 哪些因等待用户输入而阻塞(权限墙、确认提示等)
3) Complete task
3) 完成任务
bash
tmuxx agent complete-task <branch> --test-command "<cmd>" --jsonbash
tmuxx agent complete-task <branch> --test-command "<cmd>" --json4) Abort task
4) 终止任务
bash
tmuxx agent abort-task <branch> --jsonbash
tmuxx agent abort-task <branch> --jsonDiagnostics / Inspection
诊断/检查
bash
tmuxx agent list-sessions --json
tmuxx agent capture-pane %0 --lines 200 --json
tmuxx agent capture-window @0 --json
tmuxx agent read-agent-log <branch> --jsonrun-and-capturebash
tmuxx agent list-sessions --json
tmuxx agent capture-pane %0 --lines 200 --json
tmuxx agent capture-window @0 --json
tmuxx agent read-agent-log <branch> --jsonrun-and-captureLow-level Operations (Fallback)
底层操作(备选方案)
bash
tmuxx agent create-session <name> --json
tmuxx agent create-window <session> --name <name> --json
tmuxx agent split-pane %0 --horizontal --json
tmuxx agent send-command %0 --json -- <command text>
tmuxx agent send-text %0 --json -- <text>
tmuxx agent send-keys %0 C-c --json
tmuxx agent send-keys %0 --literal --json -- <text>
tmuxx agent run-and-capture %0 --wait-seconds 2 --lines 200 --json -- <command text>
tmuxx agent resize-pane %0 right --amount 10 --json
tmuxx agent kill-pane %0 --json
tmuxx agent kill-window @0 --json
tmuxx agent kill-session <name> --jsonbash
tmuxx agent create-session <name> --json
tmuxx agent create-window <session> --name <name> --json
tmuxx agent split-pane %0 --horizontal --json
tmuxx agent send-command %0 --json -- <command text>
tmuxx agent send-text %0 --json -- <text>
tmuxx agent send-keys %0 C-c --json
tmuxx agent send-keys %0 --literal --json -- <text>
tmuxx agent run-and-capture %0 --wait-seconds 2 --lines 200 --json -- <command text>
tmuxx agent resize-pane %0 right --amount 10 --json
tmuxx agent kill-pane %0 --json
tmuxx agent kill-window @0 --json
tmuxx agent kill-session <name> --jsonDeep Activity Insights (v0.3.7+)
深度活动洞察(v0.3.7+)
tmuxx now tracks activities at the pane level to provide visibility into concurrent agent workflows (inspired by Superterm's "agentic attention" concept):
tmuxx现在能够在窗格级别跟踪活动,以提供并发Agent工作流的可见性(灵感来自Superterm的"Agent注意力"概念):
Pane Status Types
窗格状态类型
- : Pane is waiting at a shell prompt (bash, zsh, etc.)
idle - : Pane has an active process (agent, compiler, test runner)
running - : Pane is expecting user input (permission request, confirmation, etc.)
waiting_for_input - : Pane process exited with error
error
- :窗格在Shell提示符(bash、zsh等)下等待
idle - :窗格有活跃进程(Agent、编译器、测试运行器)
running - :窗格正在等待用户输入(权限请求、确认操作等)
waiting_for_input - :窗格进程因错误退出
error
Detecting "Needs Prompt"
检测"需要提示"
The flag detects when a pane is blocked waiting for user action. Patterns detected:
needs_prompt- Permission requests: "permission needed", "Allow/Deny", etc.
- Input prompts: "[y/n]", "yes/no", "press any key"
- Approval walls: "waiting for approval", "confirm action"
- Tool prompts: "Tool: execute_bash" (Superterm-style)
needs_prompt- 权限请求:"permission needed"、"Allow/Deny"等
- 输入提示:"[y/n]"、"yes/no"、"press any key"
- 确认墙:"waiting for approval"、"confirm action"
- 工具提示:"Tool: execute_bash"(Superterm风格)
Example Output
示例输出
json
{
"pane_details": [
{
"pane_id": "%0",
"window_name": "editor",
"command": "claude",
"status": "running",
"needs_prompt": false
},
{
"pane_id": "%1",
"window_name": "logs",
"command": "tail",
"status": "idle",
"needs_prompt": false
}
]
}json
{
"pane_details": [
{
"pane_id": "%0",
"window_name": "editor",
"command": "claude",
"status": "running",
"needs_prompt": false
},
{
"pane_id": "%1",
"window_name": "logs",
"command": "tail",
"status": "idle",
"needs_prompt": false
}
]
}Use Cases
使用场景
- Batch agent coordination: Launch 8 agents, check to see which ones are blocked on permissions
task-report - Deep session monitoring: now shows pane statuses across all sessions — no more tab-cycling
list-sessions - Prompt detection: Automatically identify when agents hit permission walls or need user approval
- 批量Agent协调:启动8个Agent,通过查看哪些因权限问题而阻塞
task-report - 深度会话监控:现在显示所有会话的窗格状态 — 无需再循环切换标签页
list-sessions - 提示检测:自动识别Agent何时遇到权限墙或需要用户确认
TUI Enhancements (v0.3.9+)
TUI增强功能(v0.3.9+)
The interactive TUI () includes real-time pane activity visualization with ANSI color-rendered preview:
tmuxx交互式TUI()包含实时窗格活动可视化功能,支持ANSI颜色渲染预览:
tmuxxHeader Legend
头部图例
Single-line header with all status indicators:
[tmuxx] ● active ● selected ● attached ▶ running ⏸ waiting ⎇ worktree单行头部显示所有状态指示器:
[tmuxx] ● active ● selected ● attached ▶ running ⏸ waiting ⎇ worktreePane Status Badges
窗格状态徽章
Each pane shows inline status in the tree:
- = running (blue) — agent actively executing
▶ - = waiting (red) — agent blocked on permission/approval
⏸
每个窗格在树状视图中显示内联状态:
- = 运行中(蓝色)— Agent正在执行
▶ - = 等待中(红色)— Agent因权限/确认而阻塞
⏸
Worktree Tree Nodes (4th level)
工作树节点(第4级)
Worktree info appears as a child node under panes (green ):
⎇ branch-namedemo
├── editor :0 ●
│ └── zsh %0
├── build :1
│ ├── sleep %1 ▶
│ └── claude %2 ⏸
│ └── ⎇ feature-auth
└── logs :2
└── tail %3 ▶工作树信息作为窗格的子节点显示(绿色):
⎇ branch-namedemo
├── editor :0 ●
│ └── zsh %0
├── build :1
│ ├── sleep %1 ▶
│ └── claude %2 ⏸
│ └── ⎇ feature-auth
└── logs :2
└── tail %3 ▶Key Improvements
主要改进
- ANSI color preview — terminal output renders with full colors
- Context-aware footer — bindings hide when not applicable (e.g., Kill hidden with no sessions)
- Prompt detection — automatically flags agents waiting for user input
- Persistent theme (v0.3.11+) — theme selection saved to and restored on launch
~/.config/tmuxx/config.json - Auto worktree detection (v0.3.12+) — any pane in a git worktree shows automatically, regardless of how it was created
⎇ branch - Tmux status bar integration (v0.3.13+) — clickable button in tmux status bar (top-right) to detach back to tmuxx TUI
[tmuxx]
- ANSI颜色预览 — 终端输出以全彩色渲染
- 上下文感知页脚 — 绑定在不适用时自动隐藏(例如:无会话时隐藏"Kill"选项)
- 提示检测 — 自动标记等待用户输入的Agent
- 持久化主题(v0.3.11+)— 主题选择会保存到,并在启动时恢复
~/.config/tmuxx/config.json - 自动工作树检测(v0.3.12+)— 任何处于Git工作树中的窗格都会自动显示,无论其创建方式如何
⎇ branch - Tmux状态栏集成(v0.3.13+)— Tmux状态栏右上角的可点击按钮,用于切回tmuxx TUI
[tmuxx]
Error Recovery
错误恢复
When a command fails:
- Re-run with identical arguments once.
- Run (if branch-based).
tmuxx agent task-report <branch> --json - Run and
tmuxx agent list-sessions --json.tmuxx agent list-worktrees --json - If still blocked, return the exact command, error text, and suggested next command.
当命令失败时:
- 使用相同参数重新运行一次。
- 若基于分支,运行。
tmuxx agent task-report <branch> --json - 运行和
tmuxx agent list-sessions --json。tmuxx agent list-worktrees --json - 若仍阻塞,返回确切的命令、错误文本以及建议的下一步命令。
Known Limitations
已知限制
- For historical binaries (), pane command passthrough may fail or require awkward quoting for shell builtins (
<=0.3.4,cd,pwd).export - If stuck on an older binary, use raw as a temporary fallback.
tmux send-keys -t <pane> "<text>" Enter
- 对于历史版本二进制文件(),窗格命令传递可能失败,或需要对Shell内置命令(
<=0.3.4、cd、pwd)使用复杂的引号转义。export - 若被困在旧版本二进制文件中,可临时使用原生作为替代方案。
tmux send-keys -t <pane> "<text>" Enter
Notes
注意事项
- may require optional dependencies (
screenshot-window).pip install "tmuxx[mcp]" - If using npm, installs only a wrapper. The Python
npm install -g tmuxxbinary must still be available intmuxx(PATHrecommended).pipx install tmuxx - Use direct only if
tmuxis not installed or is broken, and explicitly state the reason.tmuxx
- 可能需要可选依赖(
screenshot-window)。pip install "tmuxx[mcp]" - 若使用npm,仅安装一个包装器。Python版
npm install -g tmuxx二进制文件仍需在tmuxx中可用(推荐使用PATH)。pipx install tmuxx - 仅当未安装或损坏时,才使用原生
tmuxx,并需明确说明原因。tmux