interactive-cli

Coordinate interactive CLI processes in named tmux sessions with input/output control.

2|2|Updated Sep 24, 2019
One-click install
npx skills add https://github.com/DJRHails/dotfiles --skill interactive-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: interactive-cli
Source: https://github.com/DJRHails/dotfiles/tree/main/modules/claude/skills/interactive-cli
Command: npx skills add https://github.com/DJRHails/dotfiles --skill interactive-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables developers to orchestrate and observe interactive CLI processes in a deterministic tmux workflow, reducing context switches during debugging and experimentation.

Core Features & Use Cases

  • Session Management: Launch and manage a named, detached tmux session for an interactive process.
  • Input/Output Control: Send commands to the session and capture the output for immediate inspection.
  • Reproducible Debugging Workflows: Iterate pdb, Python REPL, Node REPL, and other interactive tools across multiple turns with consistent state.

Quick Start

Start a detached pdb session in a tmux session named "proc" and view the initial prompt. tmux new-session -d -s proc "python3 -m pdb script.py" sleep 1 tmux capture-pane -t proc -p

Send input to the session

tmux send-keys -t proc $'n\n'

Read updated output

tmux capture-pane -t proc -p

Cleanup when finished

tmux kill-session -t proc

Frequently Asked Questions about interactive-cli

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

FAQPage Schema
How do I control an interactive CLI session across multiple turns?

Controlling an interactive CLI session across multiple turns requires a tool like tmux to launch a detached process and send input deterministically. This maintains consistent state for iterative debugging with tools like pdb or a REPL.

What is the best way to automate pdb debugging workflows?

Automating pdb debugging workflows is best achieved by coordinating the interactive process in a detached tmux session. You can send specific commands, capture the pane output for inspection, and maintain the REPL state across multiple interactions.

How does tmux capture output from an interactive terminal program?

Tmux captures output from an interactive terminal program using the capture-pane command. By targeting a named, detached session, you can read the current state of the REPL or debugger for immediate inspection after sending input.

Can I manage multiple interactive REPLs simultaneously using tmux?

Yes, you can manage multiple interactive REPLs simultaneously by launching each in its own named, detached tmux session. This provides deterministic session control, allowing you to direct input and capture output from any specific terminal process on demand.

How do I send input to a detached terminal session without attaching to it?

To send input to a detached terminal session without attaching, use the tmux send-keys command targeting your named session. This delivers keystrokes directly to the interactive CLI process, allowing background automation and reproducible debugging.

Why does my interactive debugging state reset between commands?

Interactive debugging state resets between commands when the process is not kept alive in a persistent session. Orchestrating the interactive CLI in a detached tmux session ensures the terminal state remains consistent and reproducible across multiple turns.