interactive-cli

A method for controlling command-line programs that wait for typed input, using persistent terminal sessions across multiple turns. A command-line program runs through a text-based terminal.

In plain words
What is it for?
Handling confirmations, menu choices, Python debugging sessions, read-eval-print loops, and other programs that require input while running.
Why use it?
It prevents interactive commands from hanging or failing when they ask questions, open menus, or start a debugging session.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/djrhails/dotfiles/interactive-cli
Any agent
npx skills add DJRHails/dotfiles --skill interactive-cli
Clone the repo
git clone --depth 1 https://github.com/DJRHails/dotfiles

Made for: Claude Code, Codex.

Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,714 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00070 $0.01714
Opus 5 $0.00035 $0.00857
Sonnet 5 $0.00014 $0.00343
Haiku 4.5 $0.00007 $0.00171

Measured yesterday against content hash efa38b933063, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

interactive-cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

modules/agents/skills/interactive-cli/SKILL.md · 173 lines

How it starts

The opening of the file, as written. The whole thing — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Interactive CLI Process Control

Control interactive CLI processes across multiple bash tool calls using tmux sessions.

Session Management

Use a named tmux session with a descriptive cli_ prefix that captures the full context of what the session is doing:

# Start a detached session with a descriptive name
# Convention: cli_<what>_<where>_<why>
# Examples:
#   cli_ssh_saintmini01_for_running_saint_up
#   cli_pdb_debug_config_loading
#   cli_pyrepl_testing_math_functions
#   cli_ssh_thechurch_checking_docker_logs
tmux new-session -d -s cli_ssh_prod_deploying_v2 -x 120 -y 40 "<command>"

# Send input (use $'...\n' for newlines)
tmux send-keys -t cli_ssh_prod_deploying_v2 $'<input>\n'

# Send multiple commands
tmux send-keys -t cli_ssh_prod_deploying_v2 $'cmd1\ncmd2\n'

# Read current terminal output (print to stdout)
tmux capture-pane -t cli_ssh_prod_deploying_v2 -p

# Read with scrollback history (start from line -100)
tmux capture-pane -t cli_ssh_prod_deploying_v2 -p -S -100

# Stop the session
tmux kill-session -t cli_ssh_prod_deploying_v2

Workflow

  1. Start: Launch the interactive process in a detached tmux session
  2. Interact: Send commands with send-keys, read output with capture-pane
  3. Iterate: Continue sending commands and reading output as needed
  4. Cleanup: Kill the session when done

Examples

Python Debugger (pdb)

# Start pdb
tmux new-session -d -s cli_pdb_debug_config_loading -x 120 -y 40 "python3 -m pdb script.py"
sleep 2 && tmux capture-pane -t cli_pdb_debug_config_loading -p

# Step through code and print a variable
tmux send-keys -t cli_pdb_debug_config_loading $'n\n'
sleep 0.5 && tmux capture-pane -t cli_pdb_debug_config_loading -p
tmux send-keys -t cli_pdb_debug_config_loading $'print(my_var)\n'
sleep 0.5 && tmux capture-pane -t cli_pdb_debug_config_loading -p

# Set breakpoint and continue
tmux send-keys -t cli_pdb_debug_config_loading $'b 42\nc\n'
sleep 1 && tmux capture-pane -t cli_pdb_debug_config_loading -p

# Quit
tmux send-keys -t cli_pdb_debug_config_loading $'q\n' && tmux kill-session -t cli_pdb_debug_config_loading

Read the full file on GitHub · 173 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 173 lines · 70 tokens per session scan A efa38b933063

Subscribe to this mod's changes

interactive-cli is a skill published in the GitHub repository DJRHails/dotfiles (2 stars, last pushed 7d ago), licensed MIT. It adds 70 tokens to every session and 1,714 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

autopilot-batch

Fan out a batch of autopilot-queued issues to parallel background worktree subagents — each runs /autopilot at the build model from its 'model:' label — with a gating review at Opus 5 or above and never below the build (Opus reviews Sonnet and Opus builds, Fable reviews Fable builds).

joshukraine/dotfiles · 75 tokens

todoist-cli

Manage Todoist tasks, projects, labels, filters, sections, comments, reminders, and workspaces via the td CLI. Use when the user wants to view, create, update, complete, or organize Todoist items, or mentions tasks, inbox, today, upcoming, projects, labels, or filters.

joshukraine/dotfiles · 68 tokens

autopilot

Carry a well-scoped GitHub issue through the full dev loop autonomously, stopping at a per-run tier boundary (PR-ready, or merge+deploy for small reversible changes).

joshukraine/dotfiles · 40 tokens

qa-handoff

Generate a hands-on QA testing guide as a self-contained HTML page — for Rails apps or static (Hugo) sites. --publish uploads the HTML to the project's configured QA host.

joshukraine/dotfiles · 41 tokens

walkthrough

Generate a hands-on browser walkthrough of a PR's user-facing changes to exercise before review; --publish posts the final version to the PR for QA.

joshukraine/dotfiles · 33 tokens

dustoff

Assess a project that's been dormant for months and produce a prioritized re-entry plan — lifecycle stage, what's stale or broken, and how far the project's tooling has drifted from current conventions — delegating every fix to the skill that owns it, and optionally capturing the plan as a tracking issue that survives…

joshukraine/dotfiles · 64 tokens