tmux

Control tmux sessions by sending keystrokes and scraping pane output.

Updated May 26, 2024
One-click install
npx skills add https://github.com/dnswd/nixos --skill tmux-dnswd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tmux
Source: https://github.com/dnswd/nixos/tree/main/config/devel/pi-mono/skills/tmux
Command: npx skills add https://github.com/dnswd/nixos --skill tmux-dnswd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill allows for the programmatic control of tmux sessions, enabling automated management of terminal multiplexer environments for interactive command-line tools.

Core Features & Use Cases

  • Remote Session Management: Control tmux sessions on remote machines or within automated workflows.
  • Interactive CLI Automation: Run and interact with tools like Python REPLs, debuggers (gdb), and other TTY applications within managed tmux panes.
  • Output Scraping: Capture and analyze the output from tmux panes for monitoring and decision-making.
  • Use Case: Automate the setup and interaction with a Python debugging session, capturing its output for analysis without manual intervention.

Quick Start

Use the tmux skill to start a new detached tmux session named 'agent-shell' on a private socket and send the command 'python3 -q' to its first pane.

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 in tmux?

Automate interactive CLI sessions in tmux by programmatically sending keystrokes to managed panes. This Skill enables deterministic task execution by controlling TTY applications like Python REPLs and GDB within detached sessions.

Can I capture and scrape output from a tmux pane programmatically?

Yes, you can capture and scrape output from a tmux pane programmatically. The Skill facilitates output scraping from interactive TTY applications, enabling automated monitoring and decision-making based on pane responses.

How do I manage isolated tmux sockets for automated remote control?

Manage isolated tmux sockets by starting new detached sessions on private sockets. The Skill supports isolated socket management and provides robust session finding utilities to ensure deterministic and conflict-free remote control.

What is the best way to run a Python debugger inside a tmux session for automation?

The best way to run a Python debugger inside a tmux session is by using this Skill to start a detached session and send the startup command as keystrokes. It facilitates interaction with debuggers like GDB without manual intervention.

Does this tmux remote control approach work with any TTY application?

Yes, this tmux remote control approach works with any TTY application. It enables sending keystrokes and scraping output from interactive command-line tools, ensuring deterministic task execution across various terminal environments.

Why use a terminal multiplexer for deterministic task execution instead of standard scripts?

Use a terminal multiplexer for deterministic task execution when standard scripts fail to interact with TTY applications. It enables sending keystrokes and scraping output from interactive CLIs that require a persistent terminal environment.