tmux

Control tmux sessions by sending keystrokes and capturing pane output.

Updated Sep 5, 2026
One-click install
npx skills add https://github.com/SillyHippy/zo-skills --skill tmux-sillyhippy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tmux
Source: https://github.com/SillyHippy/zo-skills/tree/main/skills/tmux
Command: npx skills add https://github.com/SillyHippy/zo-skills --skill tmux-sillyhippy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Interactive command-line programs like REPLs, debuggers, and coding agents require a persistent TTY, which standard one-shot shell execution cannot provide. This Skill lets an AI agent drive those interactive programs by sending keystrokes into tmux sessions and reading back the terminal output. ## Core Features & Use Cases - Session Management: Create, list, and kill tmux sessions on isolated sockets using the find-sessions.sh helper script. - Keystroke Injection & Output Capture: Send literal text or control keys to any pane and scrape scrollback history with capture-pane. - Prompt Synchronization: Poll a pane for a regex or fixed string with wait-for-text.sh to detect when a command finishes. - Use Case: Launch five parallel coding agents (e.g., Codex) in separate tmux sessions, poll each pane for the shell prompt to detect completion, then capture the full output of finished sessions. ## Quick Start Start a detached tmux session on an isolated socket, send a Python REPL command into it, and capture the pane output to see the result.

Frequently Asked Questions about tmux

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I send commands to a tmux session from a script?▼

Use tmux send-keys with the -l flag for literal text followed by Enter, targeting a pane as session:window.pane. For control keys like Ctrl-C, omit -l and pass the key name such as C-c.

How to capture terminal output from a tmux pane?▼

Run tmux capture-pane with -p to print to stdout, -J to join wrapped lines, and -S -200 to read the last 200 lines of scrollback. This returns the pane's visible text and history as plain text.

How do I wait for a command to finish inside tmux?▼

Poll the pane output for a known prompt pattern using the wait-for-text.sh script, which matches a regex or fixed string with a configurable timeout. Detecting a shell prompt like ❯ or $ indicates the command completed.

Does tmux work on Windows for terminal automation?▼

tmux is supported natively on macOS and Linux only. On Windows, install tmux inside WSL and run all session commands within the WSL environment.

When should I use tmux instead of background shell execution?▼

Use tmux only when a program needs an interactive TTY, such as REPLs, debuggers, or interactive coding agents. For long-running non-interactive tasks, background execution is simpler and preferred.