tmux

Automate interactive CLI tools by controlling tmux sessions to send keystrokes and capture output.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/botassembly/jn --skill tmux-botassembly
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tmux
Source: https://github.com/botassembly/jn/tree/main/.claude/skills/tmux
Command: npx skills add https://github.com/botassembly/jn --skill tmux-botassembly

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automating interactive tools (VisiData, PDB, database shells) is error-prone without deterministic session control. This skill shows a repeatable pattern to create a session, discover a pane, send commands, and capture output.

Core Features & Use Cases

  • Create a tmux session and attach a target pane.
  • Send keystrokes and capture panes for automation.
  • Examples for VisiData, PDB, and database shells.
  • Built-in monitoring and cleanup guidance.

Quick Start

tmux -S "$SOCKET" new -d -s "vd-session" "vd data.csv"

Frequently Asked Questions about tmux

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

FAQPage Schema
How do I automate interaction with interactive CLI tools like VisiData or database shells?

Automate interactive CLI tools by controlling tmux sessions to send keystrokes and capture output. Create a persistent tmux session with a fixed pane target, send commands through the pane, and retrieve results—enabling scripted execution across VisiData, PDB, mysql, psql, sqlite3, and other REPLs without manual intervention.

Can I script commands in database shells or interactive tools without manual typing?

Yes. tmux session automation lets you script keystrokes and capture pane output deterministically. Set up a session with a known socket and pane target, then send commands and retrieve results programmatically—works with mysql, psql, sqlite3, and other interactive shells.

What's required to set up tmux session automation for CLI tools?

You need a persistent tmux socket, a fixed pane target identifier (like :1.1), and a three-step workflow: create the session, discover the pane, then send commands and capture output. Deliberate waits and cleanup ensure reliable operation across diverse automation scenarios.

Does tmux automation work with REPLs and terminal-based applications?

Yes. tmux session control automates interaction with any REPL or terminal-based tool—VisiData, PDB, mysql, psql, sqlite3—by sending keystrokes to a known pane and capturing output, enabling repeatable, scripted workflows without manual intervention.

Why is deterministic session control needed for automating interactive tools?

Automating interactive tools without session control is error-prone because timing, state, and output capture are unpredictable. tmux provides deterministic control by managing a persistent session with known pane targets, enabling reliable keystroke injection and output retrieval.

Can I capture results from multiple database shells or interactive commands in one script?

Yes. Create separate tmux sessions or use multiple pane targets within one session, send commands to each, and capture output independently. The three-step workflow (create session, discover pane, send and capture) scales across diverse tools and task scenarios.