What problem does it solve?
This Skill enables automating the control of tmux sessions to drive interactive CLIs by sending keystrokes and scraping pane output, eliminating manual session management.
Core Features & Use Cases
- Create and manage tmux sessions on demand from your AI agent.
- Send keystrokes to specific panes and capture pane output for real-time decisions.
- Orchestrate multiple sessions across tasks like automated testing, debugging, or long-running shells.
- Use Case: Example: Run a Python REPL in a session, feed code, and read results back for analysis.
Quick Start
Set a private socket directory and start a detached session; connect and interact via tmux commands. Example steps:
SOCKET_DIR="${CLAWDBOT_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/clawdbot-tmux-sockets}"
mkdir -p "$SOCKET_DIR"
SOCKET="$SOCKET_DIR/clawdbot.sock"
SESSION=clawdbot-shell
tmux -S "$SOCKET" new -d -s "$SESSION" -n shell
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'bash' Enter
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200