terminal-capture

Capture terminal UI screenshots for CLI commands using Playwright and node-pty.

26.9k|2.8k|Updated Jun 26, 2025
One-click install
npx skills add https://github.com/QwenLM/qwen-code --skill terminal-capture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terminal-capture
Source: https://github.com/QwenLM/qwen-code/tree/main/.qwen/skills/terminal-capture
Command: npx skills add https://github.com/QwenLM/qwen-code --skill terminal-capture

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the process of capturing terminal UI screenshots for CLI commands, ensuring visual consistency and aiding in documentation.

Core Features & Use Cases

  • Automated Screenshotting: Captures terminal output for specified CLI commands.
  • Visual Regression Testing: Ideal for PR reviews to verify CLI output changes.
  • Documentation Generation: Creates visual aids for slash commands and terminal interactions.
  • Use Case: When a pull request modifies the output of the /about command, this Skill automatically generates screenshots to visually confirm the changes.

Quick Start

Run the terminal-capture skill to test the '/about' command and save 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 terminal UI screenshot testing for CLI commands?

You can automate terminal UI screenshot testing by executing CLI commands in a pseudo-terminal and capturing the output visually. This skill uses Playwright and node-pty to render terminal interactions, generating screenshots for visual regression testing and documentation.

What is visual regression testing for terminal output and when do I need it?

Visual regression testing for terminal output captures CLI command results as images to detect unintended UI changes. You need it when reviewing pull requests that modify slash commands or terminal interactions, ensuring visual consistency across updates.

Do I need npm and Playwright installed to capture terminal screenshots?

Yes, you need npm and Playwright browser installation to capture terminal screenshots. The automation relies on node-pty to simulate the terminal environment and Playwright to capture the visual output of the executed CLI commands.

Can I generate visual documentation for slash commands using terminal automation?

Yes, you can generate visual documentation for slash commands using terminal automation. By running the target commands through the capture process, the skill automatically produces screenshot visual aids that document the exact terminal interactions and output.

What is the best way to verify CLI output changes in a pull request?

The best way to verify CLI output changes in a pull request is to use automated screenshot capturing. This skill executes the modified CLI commands and generates visual screenshots, allowing you to compare the terminal output before and after the code changes.

Why does terminal screenshot testing require a pseudo-terminal instead of standard output capture?

Terminal screenshot testing requires a pseudo-terminal because standard output capture misses visual formatting. Using node-pty ensures the CLI commands run in an interactive environment, allowing Playwright to accurately capture colors, layouts, and dynamic terminal UI elements.