using-tmux-for-interactive-commands

Control interactive CLI tools via detached tmux sessions and send-keys.

52|6|Updated Nov 24, 2025
One-click install
npx skills add https://github.com/ovachiever/droid-tings --skill using-tmux-for-interactive-commands
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-tmux-for-interactive-commands
Source: https://github.com/ovachiever/droid-tings/tree/main/skills/using-tmux-for-interactive-commands
Command: npx skills add https://github.com/ovachiever/droid-tings --skill using-tmux-for-interactive-commands

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Interactive CLI tools (vim, git rebase -i, Python REPL, etc.) require a real terminal. tmux enables detached sessions and programmatic control via send-keys and capture-pane.

Core Features & Use Cases

  • Detached sessions: run interactive commands in the background
  • send-keys & capture: feed input and capture screen state
  • Common patterns: Python REPL, Vim editing, and interactive Git workflows

Quick Start

Example workflows:

  • Start a session: tmux new-session -d -s edit_session vim file.txt
  • Send input: tmux send-keys -t edit_session 'i' 'Hello World' Escape ':wq' Enter
  • Capture: tmux capture-pane -t edit_session -p
  • Stop: tmux kill-session -t edit_session

Frequently Asked Questions about using-tmux-for-interactive-commands

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

FAQPage Schema
How do I automate interactive CLI tools like vim or git rebase with tmux?

tmux automates interactive CLI tools by creating detached sessions and sending programmatic input via send-keys, then capturing output with capture-pane. This lets you control editors, REPLs, and full-screen applications without a live terminal, handling both keystrokes and special keys like Escape and Enter.

Can I use tmux to automate git add -p or other interactive git workflows?

Yes. tmux manages interactive git commands like git rebase -i and git add -p by running them in detached sessions, sending staged input sequences (including navigation keys), and reading the screen state. This automates partial staging and rebase workflows that normally require manual terminal interaction.

How do I send input to a tmux session and capture its output?

Create a detached session with tmux new-session -d, use tmux send-keys to feed input and special keys, and capture screen state with tmux capture-pane -p. Cleaning up uses tmux kill-session to close sessions after completion.

What's the difference between running interactive commands directly and using tmux automation?

Direct execution requires a live terminal and blocks execution. tmux automation runs commands in background sessions, sends input programmatically, and lets you read output without user interaction, enabling reliable automation of editors, REPLs, and full-screen tools.

Do I need special setup to automate Python REPL or other terminal applications with tmux?

No special setup beyond tmux itself. Start a detached session running the application, wait for initialization, then use send-keys to send commands and capture-pane to read responses. The wrapper pattern handles session lifecycle and cleanup automatically.