microsoft/inshellisense/tui-test

Claude Code and agent skill by microsoft/inshellisense

Trust tier 4
  • vendor
Source check pending

Checking that the SKILL.md file is still in the repository.

Drive, inspect, assert on, record, and watch a real terminal from the command line with the tui-test cli. Use when running shells (bash, zsh, fish, PowerShell, pwsh, cmd, xonsh, elvish, nushell) or TUI programs (vim, less, top, etc.) in a headless PTY; sending keystrokes, key combos, or mouse input; resizing, writing raw bytes, or signaling the child; waiting for a command to finish or the screen to settle; asserting on terminal text, colors, exit codes, output, or snapshots; capturing text or full-color SVG screenshots; recording and replaying asciinema sessions; watching a live cli session while an agent drives it; or driving process-local sessions from Rust, Python, or Node.

Install

npx vskill@latest install microsoft/inshellisense/tui-test

SKILL.md

The same SKILL.md was published earlier as microsoft/inshellisense/tui-test.

tui-test

tui-test controls a real terminal from the command line. It runs shells and TUI programs in a headless PTY behind a background daemon: a stateless cli front end talks to a daemon that owns the PTY and renders it into a full terminal emulator. Each call connects, acts, and exits, and they all share one live session. With it you can spawn a session, read the rendered screen, send keys and mouse input, wait for a condition, assert on the result, and record the session.

Built for agents: self-documenting commands

Three commands let an agent look up the rest of the surface instead of guessing:

  • tui-test agent-context: versioned JSON describing every command, flag,

enum, default, and the exit-code taxonomy. It is generated from the cli, so it stays in sync. Read this first when you need exact argument shapes.

  • tui-test usage: a one-screen command cheatsheet.
  • tui-test skill: this guide.

Core model

  • Sessions. --session <name> (default default, env TUI_TEST_SESSION)

selects a terminal. The first command auto-starts that session's daemon; the session persists across calls until close. Sessions are independent.

  • Stateless calls. Each invocation connects to the daemon, acts, and exits.

State (screen, cwd, last command) lives in the daemon, not the cli.

  • JSON. Pass --json on any command for machine-readable output. Data goes

to stdout, diagnostics to stderr. On failure the JSON carries a "kind" (assertion / usage / no_session / internal).

  • Verbose. --verbose / -v starts the daemon with a full PTY traffic log

(see Debugging). Only takes effect when the daemon starts.

  • Daemon upgrades. A client automatically replaces a daemon from another

tui-test version. Per-session locking prevents concurrent clients from racing the restart.

  • Defaults. New sessions are 80x30. Timeouts come in five classes: text

and idle default to 5s; command, exit, and ready to 30s. Set a session default in the selected config profile or with open --timeout-<class> <ms>, or override one call with --timeout. state reports the effective values.

Exit codes

Every command returns a stable exit code so you can branch on the failure class without parsing text:

CodeMeaning
0success
1assertion or wait condition not met (expect / wait)
2usage / invalid argument
3no active session (run open / run first)
4daemon or IPC error
5internal error

Command reference

Session & lifecycle
CommandDescription
open [--shell S] [--backend B] [--cols N] [--rows N] [--cwd D] [--env K=V]... [--config F] [--profile P] [--restart]Spawn or reuse a shell session. --env is repeatable.
run [--backend B] [--cols N] [--rows N] [--cwd D] [--env K=V]... [--config F] [--profile P] [--restart] <program> [args...]Spawn or reuse a session running a program directly.
sessionsList active sessions.
close [--all]Close the current session (or every session with --all).
daemon startStart this session's daemon. Most commands start one on demand.
daemon statusInspect a session's daemon (pid, log path). Exit 3 if none is running.
`daemon stop --session N \--all`Stop one session's daemon, or every daemon. Needs a target.

open and run reuse an existing live child for the selected session. Pass --restart (or --force) to replace it.

Inspection
CommandDescription
statecwd, size, cursor, window title, last command + exit code, bell count, timeouts, and a text snapshot.
text [--full]Rendered viewport text, or full scrollback with --full.
screenshot [PATH] [-o FILE] [--full] [--zoom N]Terminal text to stdout, or a full-color SVG scaled without changing its terminal cells.
cells X Y [W H]Per-cell attributes (char, fg, bg, flags) for a region.
`get command\output\exit-code\cwd\cursor\size\title\bells\bell-events`One structured field.
Input
CommandDescription
type "text"Type literal text (no return key).
submit ["text"]Type text then press the shell's return key. Omit text to just submit.
key press <Key...>Simulate key presses, e.g. key press Ctrl+C.
key down <Key...> / key up <Key...>Simulate explicit keydown and keyup events.
key repeat <Key...>Send repeat events (press-equivalent in legacy mode).
mouse click X Y / mouse click --on-text "OK" [--button N] [--clicks N]Click by coordinates or by visible label.
`mouse move\down\up\drag\scroll ...`Full mouse control (--button default 0=left, scroll --amount default 3).

Key input automatically follows the Kitty keyboard protocol flags negotiated by the child application. A key press sends the normal press input and adds a release only when the child requests event-type reporting. Text-producing keys also require report-all-keys mode before repeat and release events can be represented. Modifiers are Ctrl, Alt / Option, Shift, Super, Hyper, and Meta. Top-level press remains a compatibility alias for key press.

PTY control
CommandDescription
resize COLS ROWSResize the PTY and emulator.
write <data>Write raw bytes to the PTY (no return key appended).
`signal INT\TERM\KILL\QUIT`Send a signal to the session's child process.
killKill the session's child process.
Wait (block until a condition holds)
CommandDescription
wait text "T" [--regex --full --not --timeout MS]Until text/regex is (with --not, is not) visible. Most precise wait.
wait title "T" [--regex --not --timeout MS]Until the window title (OSC 0/OSC 2) matches. Programs announce progress there.
wait idle [--timeout MS]Until the screen stops repainting (~250ms quiet).
wait command [--timeout MS]Until the current foreground command finishes (needs shell integration).
wait exit [--timeout MS]Until the session's program/shell itself exits.
wait ready [--timeout MS]Until the shell reports a ready prompt (needs shell integration). open waits by default.
wait bell [--timeout MS]Until the next terminal bell event.
Expect (exit 0 = pass, 1 = fail)
CommandDescription
expect text "T" [--regex --full --no-strict --not --fg C --bg C --timeout MS]Visibility plus optional color. --no-strict relaxes a strict single-match.
expect title "T" [--regex --not --timeout MS]The window title set with OSC 0/OSC 2. An unset title matches nothing.
expect exit-code N [--timeout MS]The last command's exit code. Waits for the command to finish first.
expect output "T" [--regex]The last command's captured output.
expect bell N [--timeout MS]The cumulative bell count reaches at least N.
expect snapshot NAME [-u] [--include-colors --include-title]Compare the screen against __snapshots__/NAME.snap; -u writes/updates it. --include-title records the window title in the frame; off by default because a prompt often sets it to a host and path.

Colors accept ansi-256 (9), hex (#ff0000), or rgb (255,0,0).

Recording, monitor & self-docs
CommandDescription
record start OUT [options]Start APNG, GIF, MP4, or asciicast recording; --zoom N scales image/video output.
record stopFinish the active recording.
get-recording [session]Print the always-on asciinema v2 cast (works even after the session stopped).
monitorWatch the session live, full-color, in another terminal.
usage / agent-context / skillSelf-documentation (see top of guide).

Workflow: run a command and check the result

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 28 Sep 2026.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
10,710
Repository forks
256
7-day trend score
46

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill CERTIFIED badge
[![vskill CERTIFIED](https://verified-skill.com/api/v1/skills/microsoft/inshellisense/tui-test/badge)](https://verified-skill.com/skills/microsoft/inshellisense/tui-test)

Something wrong with this skill or its page? Tell us.