mcpField
P
pty-capture

pty-capture

github.com/factory-aiTesting & quality11785 installsUpdated 3d ago
Repository

About pty-capture

A skill for capturing the exact bytes a terminal emits in response to keystrokes, for input-encoding checks rather than visual UI testing. It documents capture approaches for Linux, Windows, and macOS, with results used in CLI compatibility tests.

Key features

  1. 01Capture bytes emitted for keystrokes
  2. 02Support Linux, Windows, and macOS
  3. 03Provide platform-specific capture guidance
  4. 04Feed captures into replay tests

Use cases

  1. 01Verify a terminal's key sequences
  2. 02Build terminal compatibility fixtures
  3. 03Debug key handling in a CLI

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/factory-ai/factory-plugins --skill pty-capture

After installing, type/pty-capturein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

platforms/
linux.md
macos.md
windows.md

Details

From the project README

PTY Byte Capture

The orchestrator routed you here. Use these mechanics to execute your plan.

Capture the exact bytes a real terminal emits for a given keystroke. Use this when the question is "what sequence does terminal X send for key Y?" rather than "does the UI look right?"

Platform support

PlatformStatusRead
Linux / WaylandImplementedplatforms/linux.md
Windows (KVM)Implementedplatforms/windows.md
macOS (QEMU)Implementedplatforms/macos.md

Read the platform file for your target OS. Each contains the capture architecture, prerequisites, usage pattern, and platform-specific notes.

Known dead ends

  • Xvfb + xdotool: bypasses real keyboard processing entirely
  • uinput + Xvfb: Xvfb does not consume kernel input devices
  • SSH PTY for keystroke injection: distorts the input encoding; SSH is only for output capture or deployment

Follow-on

Feed captured bytes into terminal compatibility fixtures and replay tests in apps/cli.

Comments

Markdown supported