Skip to content
obra avatar

Using Tmux For Interactive Commands

Tmux-based control of interactive CLI tools like vim, git rebase -i, and REPLs through detached sessions.

CCM score
68 of 100
skills.sh installs
521
GitHub stars
441
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers starting, driving, capturing, and stopping interactive sessions via send-keys and capture-pane -p
  • Includes a quick-reference table, special key names, a helper wrapper script, and examples for vim, Python REPL, and git rebase
  • Explains when to use tmux versus plain Bash, plus common mistakes such as missing Enter keys and orphaned sessions
  • Designed for agents that must automate full-screen editors, interactive git commands, or readline-based REPLs

Install

$ npx -y skills add obra/superpowers-lab --skill using-tmux-for-interactive-commands -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Using tmux for Interactive Commands

Overview

Interactive CLI tools (vim, interactive git rebase, REPLs, etc.) cannot be controlled through standard bash because they require a real terminal. tmux provides detached sessions that can be controlled programmatically via send-keys and capture-pane.

When to Use

Use tmux when:

  • Running vim, nano, or other text editors programmatically
  • Controlling interactive REPLs (Python, Node, etc.)
  • Handling interactive git commands (git rebase -i, git add -p)
  • Working with full-screen terminal apps (htop, etc.)
  • Commands that require terminal control codes or readline

Don't use for:

  • Simple non-interactive commands (use regular Bash tool)
  • Commands that accept input via stdin redirection
  • One-shot commands that don't need interaction

Quick Reference

TaskCommand
Start sessiontmux new-session -d -s <name> <command>
Send inputtmux send-keys -t <name> 'text' Enter
Capture outputtmux capture-pane -t <name> -p
Stop sessiontmux kill-session -t <name>
List sessionstmux list-sessions

Core Pattern

Details

Repository
github.com/obra/superpowers-lab
Categories
CLI & Terminal, Agent Workflow & Planning
First seen
Jun 3, 2026

Questions

What does the using-tmux-for-interactive-commands skill do?

The using-tmux-for-interactive-commands skill lets an agent control interactive CLI tools such as vim, interactive git rebase, and Python REPLs. It runs them in detached tmux sessions, sends keystrokes with send-keys, and reads the screen with capture-pane.

When should I use the using-tmux-for-interactive-commands skill?

Use the using-tmux-for-interactive-commands skill when a command needs real-time input and output, such as git rebase -i, git add -p, vim, nano, htop or a REPL. Its own guidance says to skip it for simple non-interactive commands that the regular Bash tool can run.

How do I install the using-tmux-for-interactive-commands skill?

Run npx -y skills add obra/superpowers-lab --skill using-tmux-for-interactive-commands -y in your project to install it. Once installed, the using-tmux-for-interactive-commands skill lets the agent drive an interactive terminal program through tmux sessions.

What does the using-tmux-for-interactive-commands skill need to run?

The using-tmux-for-interactive-commands skill needs tmux installed on your system, and its superpowers-lab plugin lists Linux and macOS as tested platforms. It has no API key or account requirement in its listing.

Where does the using-tmux-for-interactive-commands skill fit in the CLI & Terminal category?

The using-tmux-for-interactive-commands skill is in the CLI & Terminal category on Claude Marketplaces, next to herdr, gws-shared, opentui, cf-cli and pnpm. It stands out by handling terminal programs that need keyboard navigation, using tmux send-keys and capture-pane to automate them.

More from obra/superpowers-lab

All 3

Similar to Using Tmux For Interactive Commands

More CLI & Terminal