tmux

Send keystrokes and scrape pane output from tmux sessions.

11|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/PrettiFlow/pretticlaw --skill tmux-prettiflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tmux
Source: https://github.com/PrettiFlow/pretticlaw/tree/main/src/skills/tmux
Command: npx skills add https://github.com/PrettiFlow/pretticlaw --skill tmux-prettiflow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tmux, and includes scripts (resource) components.

What problem does it solve?

Provides programmatic control of interactive tmux sessions so you can automate keystroke-driven CLIs, monitor REPLs, and reliably scrape pane output without manual terminal interaction.

Core Features & Use Cases

  • Interactive TTY Automation: Send literal keystrokes, control sequences, and control keys to panes for driving REPLs and other interactive programs.
  • Output Scraping & Polling: Capture pane history, wait for text patterns, and extract recent output for downstream processing.
  • Socket-based Isolation & Session Management: Use an isolated socket directory convention to run private tmux servers and manage multiple parallel agent sessions.
  • Helper Scripts: Includes scripts to find sessions across sockets and to poll a pane for a regex or fixed string with timeout handling.
  • Use Case: Orchestrate multiple coding agents in parallel, run automated interactive tests, or monitor long-running CLI tasks and collect their output.

Quick Start

Start an isolated tmux socket, create a detached session, send the desired command into the pane, and capture the pane output using the included helper scripts.

Frequently Asked Questions about tmux

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

FAQPage Schema
How do I automate keystrokes and scrape output from an interactive terminal session?

You can automate interactive terminal sessions by sending literal keystrokes and control sequences to tmux panes, then scraping the pane history and polling for specific text patterns. This allows programmatic control of REPLs and interactive CLIs without manual input.

Can I run multiple parallel coding agents in isolated tmux environments?

Yes, you can orchestrate multiple parallel coding agents by utilizing isolated socket directories to run private tmux servers. This session management approach keeps parallel TTY workflows separate and allows independent monitoring of each agent.

How do I wait for a specific text pattern to appear in terminal output?

You can wait for text patterns in terminal output by using helper scripts that poll a tmux pane for a regex or fixed string with timeout handling. This captures recent output and ensures downstream processing only triggers when the expected text appears.

Does this terminal automation approach work on macOS and Linux?

Yes, this terminal automation approach is applicable to macOS and Linux interactive TTY workflows. You need the tmux dependency installed and available on your PATH to send keystrokes and scrape pane output.

What is the best way to monitor long-running CLI tools and collect their output?

The best way to monitor long-running CLI tools is to create a detached tmux session, send the desired command into the pane, and capture the pane output using included helper scripts. This isolates the process and allows reliable output extraction.

How do I list active tmux sessions across different isolated sockets?

You can list active sessions across different isolated sockets by using the included helper scripts designed to find sessions. This manages multiple parallel agent sessions running on private tmux servers with custom socket paths.