terminal-capture

Capture terminal UI screenshots of CLI commands using node-pty, xterm.js, and Playwright.

Updated May 15, 2026
One-click install
npx skills add https://github.com/qazz92/glm-code --skill terminal-capture-qazz92
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terminal-capture
Source: https://github.com/qazz92/glm-code/tree/main/.glm/skills/terminal-capture
Command: npx skills add https://github.com/qazz92/glm-code --skill terminal-capture-qazz92

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires node-pty, xterm.js, playwright, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates terminal UI screenshot testing for CLI commands, making it easier to review PRs, test slash commands, and generate visual documentation.

Core Features & Use Cases

  • Automated UI Screenshot Testing: Capture screenshots of terminal UI for CLI commands.
  • PR Review Integration: Enhance visual verification during PR reviews.
  • Use Case: Use this Skill to automate screenshot capture for slash commands (/about, /context, /auth, /export) or when 'terminal screenshot', 'CLI test', 'visual test', or 'terminal-capture' is mentioned.

Quick Start

Use the terminal-capture skill to generate a screenshot of the '/about' command output.

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?

Yes, terminal screenshot capture enhances PR reviews by generating visual output of CLI commands. It renders slash command outputs like /about or /auth into screenshots, making visual verification faster and more reliable during code reviews.

What do I need to run automated CLI screenshot tests with Playwright?

Terminal screenshot testing uses node-pty to spawn a pseudo-terminal, xterm.js to render the terminal UI in a browser environment, and Playwright to capture the rendered output as a screenshot. This combination accurately captures CLI visual output.

Can I capture screenshots of slash commands in my CLI application?

Use terminal-capture to automate screenshot generation for slash commands like /about, /context, /auth, and /export. It triggers when 'terminal screenshot', 'CLI test', or 'visual test' is mentioned, rendering command output into image files.

Are there limitations when using xterm.js and Playwright for terminal visual testing?

Limitations include requiring a full Node.js, npm, and Chromium environment to run the visual tests. The testing process depends on browser-based rendering via xterm.js and Playwright, which may not capture non-standard terminal escape sequences accurately.