hex1b

Launch terminal apps in a headless virtual terminal and assert output.

6.2k|952|Updated Sep 25, 2023
One-click install
npx skills add https://github.com/microsoft/aspire --skill hex1b
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hex1b
Source: https://github.com/microsoft/aspire/tree/main/.agents/skills/hex1b
Command: npx skills add https://github.com/microsoft/aspire --skill hex1b

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hex1b removes flaky, manual testing and demo recording of terminal-based apps by letting you programmatically control interactive programs, inspect what they render, and wait for specific output reliably.

Core Features & Use Cases

  • Virtual terminal automation: Start TUI apps, shells, REPLs, and interactive CLIs inside a headless virtual terminal for repeatable runs.
  • Screen capture for verification: Capture terminal output as text, ANSI, SVG, PNG, or HTML to create assertions and visual evidence.
  • Deterministic interaction: Inject keyboard and mouse input and use wait/assert operations to avoid timing issues.
  • Workflow examples: End-to-end scripted tests for interactive UIs; capturing recordings for demos; validating that expected menus, errors, or prompts appear.

Quick Start

Start a process in a virtual terminal and then assert that the expected text appears before sending any input: run dotnet hex1b terminal start with a command, then use dotnet hex1b assert on the returned terminal id with the target text and a timeout.

Frequently Asked Questions about hex1b

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

FAQPage Schema
How do I automate testing for interactive CLI and TUI applications?

Automate testing for interactive CLI and TUI applications by launching them inside a headless virtual terminal, injecting keyboard input, and asserting expected text appears before proceeding. This removes manual verification and timing flakiness.

How do I capture screenshots of terminal output for automated test assertions?

Capture screenshots of terminal output as text, ANSI, SVG, PNG, or HTML to create deterministic assertions and visual evidence. This allows automated tests to verify that expected menus, errors, or prompts render correctly.

Can I send keyboard and mouse events to automate a headless terminal process?

Yes, you can send keyboard and mouse events to a headless terminal process. You inject input into a specified terminal id and use wait operations with timeouts to ensure the application is ready for the next interaction.

What is the best way to record deterministic demos for interactive REPLs and shells?

The best way to record deterministic demos for interactive REPLs and shells is to script the interactions inside a headless virtual terminal. This ensures repeatable runs by capturing output and injecting input without manual intervention.

Does terminal automation work with programs that require a specific startup sequence?

Terminal automation requires a deterministic terminal start. You launch the process inside the headless virtual terminal and then use wait and assert operations with timeouts to verify the startup sequence completed before sending input.

Why do my interactive terminal tests fail due to timing issues?

Interactive terminal tests fail due to timing issues when input is sent before output is ready. Avoid this by using text presence and absence assertions with timeouts to wait for expected output before injecting subsequent keyboard or mouse events.