control-cli

Build repeatable tmux or PTY harnesses to capture CLI/TUI transcripts.

Updated May 22, 2026
One-click install
npx skills add https://github.com/paulbrittain/claude-team-kit --skill control-cli-paulbrittain
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: control-cli
Source: https://github.com/paulbrittain/claude-team-kit/tree/main/skills/control-cli
Command: npx skills add https://github.com/paulbrittain/claude-team-kit --skill control-cli-paulbrittain

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It removes guesswork when a CLI or TUI behaves inconsistently by providing a repeatable harness that captures what happened and lets you replay interactions deterministically.

Core Features & Use Cases

  • Deterministic local harnesses: Reuses repo-native test/demo harnesses when available, or builds a temporary harness using tmux or PTY for controlled interaction.
  • Before/after evidence: Captures terminal screen/transcripts around specific actions so bug reports and fixes are grounded in actual output.
  • Profiling & reliability checks: Supports startup timing, CPU profiling, heap/memory leak investigation, and hang investigation with clean teardown.
  • Safety guardrails: Emphasizes non-destructive behavior, deterministic waits over sleeps, and cleanup of sessions/artifacts.

Quick Start

Use control-cli to build a minimal tmux or PTY harness that runs your CLI under deterministic environment variables and returns a captured transcript of the interactive flow you specify.

Frequently Asked Questions about control-cli

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

FAQPage Schema
How do I test interactive CLI behavior deterministically?

Testing interactive CLI behavior deterministically involves building a local tmux or PTY harness to drive the application, capture screen transcripts, and cleanly terminate the session for repeatable results.

What is the best way to debug a TUI application that hangs on startup?

The best way to debug a TUI startup hang is running the application within a profiling harness that captures startup timing and CPU artifacts while enforcing deterministic waits over arbitrary sleeps.

Can I use tmux to automate keyboard and resize testing for terminal applications?

Yes, tmux can automate keyboard, interrupt, and resize testing by assembling a controlled PTY harness that drives the interactive flow and captures terminal screen output.

How do I capture terminal transcripts before and after a specific CLI action?

To capture terminal transcripts around a CLI action, run the application in a local test harness that records screen state transitions before and after triggering the specific interactive event.

Does profiling a CLI for memory leaks require external services?

Profiling a CLI for memory leaks does not require external services; the harness builds local PTY or tmux environments to capture heap artifacts and investigate hangs with clean teardown.

Why should I avoid using sleep commands when testing interactive prompt flows?

Avoiding sleep commands when testing prompt flows ensures repeatable timing through deterministic waits, preventing race conditions and ensuring reliable transcript capture during interactive UX testing.