🧵

tmux

Remote-control tmux sessions by sending keystrokes and scraping pane output — essential for managing Claude Code and parallel workers.

автор: OpenClawv1.0.0
Coding Agents & IDEsProductivityAutomationCLISelf-HostedDeveloper Tool
Подключение к ВМ...
Подключение к ВМ...
npx clawhub@latest install tmux
8Текущие установки
v1.0.0Версия

Требования

tmux

The tmux skill gives AI agents the ability to interact with live terminal sessions as if they were sitting at the keyboard. Instead of running one-off commands, the agent can send keystrokes, read scrollback output, and navigate windows and panes inside any running tmux session.This is especially powerful for supervising long-running interactive tools like Claude Code or Codex — the agent can poll session output, detect when a prompt is waiting for approval, respond with a keypress, and move on. It also enables patterns like coordinating parallel worker sessions (worker-2 through worker-8) from a single orchestrating agent.

Принцип работы

The skill wraps the standard tmux CLI to expose three core primitives:Capture output — tmux capture-pane reads the visible buffer or full scrollback of any pane and prints it to stdout for the agent to inspect.Send keys — tmux send-keys injects text and special keys (Enter, Escape, Ctrl+C, Ctrl+D, etc.) into a target pane, driving interactive TUIs without a real keyboard.Navigate sessions — the agent can list sessions and windows, select panes, rename or kill sessions, and create new ones — all by composing standard tmux subcommands.Sessions are addressed using tmux's session:window.pane target format (e.g., shared:0.0). Because tmux sessions survive SSH disconnects, the agent can monitor background work that was started earlier and pick up where it left off.

Ключевые возможности

Pane Output Scraping — Capture the last N lines or the entire scrollback history of any pane for programmatic inspection.Keystroke Injection — Send literal text, special keys (Enter, Escape), and control sequences (Ctrl+C, Ctrl+D, Ctrl+Z) to any session.Safe TUI Input — Splits text and Enter into separate sends to avoid paste and multiline edge cases in interactive applications.Parallel Session Coordination — Loop over multiple named sessions (e.g., worker-2–worker-8) to check status and dispatch tasks in bulk.Claude Code Prompt Detection — Grep captured output for prompts (❯, Yes/No, proceed, permission) and auto-approve or respond.Full Session Lifecycle — Create, rename, and kill sessions; list windows and panes; select targets by index.SSH-Persistent Sessions — tmux sessions survive disconnects, so the agent can reconnect and resume monitoring at any time.

Требования

tmux — The tmux binary must be installed and available on PATH. This skill does not manage installation of tmux itself; install it via your system package manager (e.g., brew install tmux on macOS or apt install tmux on Debian/Ubuntu). No API keys or cloud services are required.

Сценарии использования

Claude Code Supervision — Monitor one or more Claude Code sessions, detect permission prompts, and automatically approve or respond without manual intervention.Parallel Worker Orchestration — Dispatch tasks to multiple named worker sessions and poll their output to track progress across a large batch of parallel jobs.Interactive Process Control — Drive any TUI application (REPLs, database shells, ncurses tools) by sending keystrokes and reading responses programmatically.Long-Running Job Monitoring — Scrape output from processes started in detached sessions, even after SSH reconnects, to check logs or detect completion.

Как установить

1
Run in your terminal
npx clawhub@latest install tmux
or
2
Click the Install button at the top of this page for one-click setup

Часто задаваемые вопросы

Отзывы

0 отзывов

Войдите, чтобы написать отзыв

Отзывов пока нет. Будьте первым, кто поделится своим опытом!