terminal-capture

Automate terminal UI screenshot testing for CLI commands with TypeScript scenarios.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/Heron11/otter-code --skill terminal-capture-heron11
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terminal-capture
Source: https://github.com/Heron11/otter-code/tree/main/.qwen/skills/terminal-capture
Command: npx skills add https://github.com/Heron11/otter-code --skill terminal-capture-heron11

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill captures terminal interactions as deterministic screenshots so reviewers and documenters no longer guess whether CLI outputs changed after a PR or release.

Core Features & Use Cases

  • Scenario-driven automation: Define TypeScript scenarios that spawn the CLI, send text input or key events, and capture before/after states for every step.
  • Visual verification during PR review: Screenshot every slash command run (/about, /context, /auth, /export) and record progress states when streaming long-running outputs.
  • Robust output capture: Automatically names screenshots, supports full scrollback captures, and optionally records GIFs when ffmpeg is available.

Quick Start

Use terminal capture to define a CLI scenario and then run the scenario runner to collect annotated screenshots.

Frequently Asked Questions about terminal-capture

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

FAQPage Schema
How do I automate CLI screenshot validation for terminal commands?

Automate CLI screenshot validation by defining TypeScript scenarios that spawn commands via node-pty, capture terminal output using xterm.js, and save screenshots with Playwright. This records deterministic visual states for every step of an interaction.

Can I capture terminal output screenshots during PR review for slash commands?

Yes, you can capture terminal output screenshots during PR review by running scenario configurations that execute slash commands like /about or /auth. The runner automatically captures and names screenshots for each command's output state.

Does terminal screenshot testing work with TypeScript and Playwright?

Yes, terminal screenshot testing requires TypeScript scenario configurations to define interactions and uses Playwright to capture the visual output. You also need to install the Playwright browser binaries to execute the captures.

What is the best way to record terminal interactions as GIFs for visual documentation?

To record terminal interactions as GIFs for visual documentation, ensure ffmpeg is installed on your system. The Skill optionally records GIF streams of CLI commands and terminal output when ffmpeg is available.

Do I need node-pty and xterm.js to automate terminal UI testing?

Yes, you need node-pty and xterm.js to automate terminal UI testing because the Skill orchestrates node-pty to spawn the CLI process and xterm.js to render the terminal output before capturing it with Playwright.

Why capture full scrollback when testing CLI output validation?

Capturing full scrollback during CLI output validation ensures that streaming long-running outputs and progress states are recorded completely. This prevents missing visual changes that occur outside the visible terminal viewport.