tmux

Control tmux sessions by sending keystrokes and scraping pane output.

2|Updated Jun 1, 2015
One-click install
npx skills add https://github.com/TimoFreiberg/dotfiles --skill tmux-timofreiberg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tmux
Source: https://github.com/TimoFreiberg/dotfiles/tree/main/agents/skills/tmux
Command: npx skills add https://github.com/TimoFreiberg/dotfiles --skill tmux-timofreiberg

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill allows for the remote control of tmux sessions, enabling programmatic interaction with command-line interfaces like Python shells or debuggers, and capturing their output.

Core Features & Use Cases

  • Interactive CLI Management: Start, send commands to, and monitor interactive CLI applications within isolated tmux sessions.
  • Output Scraping: Capture the output of processes running in tmux panes for analysis or logging.
  • Use Case: Debug a Python script interactively by starting a Python REPL in a tmux pane, sending code, and capturing the output and any errors.

Quick Start

Use the tmux skill to start a new isolated tmux session named 'agent-python' and run 'python3 -q' within it.

Frequently Asked Questions about tmux

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

FAQPage Schema
How do I automate interactive CLI sessions and capture their output?

You can control interactive CLI sessions by sending keystrokes to isolated tmux sockets and scraping pane output programmatically. This enables automated interaction with shells like Python REPLs and capturing their responses.

Can I use tmux to interact with a Python REPL or debugger programmatically?

Yes, tmux supports interacting with a Python REPL or debugger by starting the process in an isolated session, sending code as keystrokes, and capturing the resulting output or errors directly from the pane.

How do I wait for specific text output in a tmux pane before sending the next command?

You can use helper scripts to wait for specific text patterns within tmux panes. This ensures the session has fully processed a command and displayed the expected output before sending subsequent keystrokes.

Do I need any special tmux plugins to control sessions remotely?

No, you only need a stock tmux installation on Linux or macOS. The Skill relies on native tmux capabilities for isolated socket management and pane output scraping without requiring additional plugins.

What is the best way to manage isolated tmux sessions for autonomous agents?

The best way is to use agent-specific isolated socket management. This creates dedicated tmux sessions for each agent, preventing cross-interference when sending keystrokes and capturing output from interactive CLIs.