Hex1b.Tool
0.164.1
See the version list below for details.
dotnet tool install --global Hex1b.Tool --version 0.164.1
dotnet new tool-manifest
dotnet tool install --local Hex1b.Tool --version 0.164.1
#tool dotnet:?package=Hex1b.Tool&version=0.164.1
nuke :add-package Hex1b.Tool --version 0.164.1
Hex1b.Tool
A command-line tool for managing and interacting with Hex1b terminal applications. Provides terminal hosting, screen capture, input injection, widget tree inspection, session recording, and more.
Installation
Install as a .NET global tool:
dotnet tool install -g Hex1b.Tool
This makes the hex1b command available system-wide. Alternatively, install as a local tool in your project:
dotnet tool install Hex1b.Tool
Then invoke with dotnet hex1b.
Quick Start
Connect to a running app
Any Hex1b application that uses .WithDiagnostics() is automatically discoverable:
# List all discoverable terminals
hex1b terminal list
# Attach to a terminal (interactive TUI mirror)
hex1b terminal attach <id>
# Take a screenshot
hex1b capture screenshot <id>
Start a hosted terminal
Start new terminal sessions that host shell commands:
# Start the default interactive shell
# (PowerShell on Windows, bash on Linux/macOS)
hex1b terminal start
# Start with custom dimensions
hex1b terminal start --width 120 --height 40 -- htop
# Start and immediately attach
hex1b terminal start --attach -- vim
Commands
terminal — Manage terminal sessions
| Command | Description |
|---|---|
terminal list |
List all discoverable terminals |
terminal start |
Start a hosted terminal session |
terminal stop |
Stop a hosted terminal |
terminal info |
Show terminal metadata and details |
terminal attach |
Attach to a terminal with an interactive TUI mirror |
terminal resize |
Resize terminal dimensions |
terminal clean |
Remove stale diagnostic sockets |
capture — Screenshots and recordings
| Command | Description |
|---|---|
capture screenshot |
Capture terminal screen (text, ANSI, SVG, HTML, or PNG) |
capture recording start |
Begin recording a session to a .cast file |
capture recording stop |
Stop an active recording |
capture recording status |
Check recording status |
capture recording playback |
Play back a .cast recording |
keys — Send keyboard input
hex1b keys <id> --text "hello world"
hex1b keys <id> --key Enter
hex1b keys <id> --key Tab --ctrl
mouse — Send mouse input
| Command | Description |
|---|---|
mouse click |
Click at coordinates |
mouse drag |
Drag between coordinates |
app — Inspect widget trees
| Command | Description |
|---|---|
app tree |
Show the widget/node tree of a running application |
assert — Validate terminal content
Assert on terminal content for scripting and CI:
hex1b assert <id> --text-present "Ready" --timeout 10
hex1b assert <id> --text-absent "Error"
agent — AI agent integration
| Command | Description |
|---|---|
agent init |
Generate a skill file for AI coding agents |
agent mcp |
Start an MCP server |
Global Options
| Option | Description |
|---|---|
--json |
Output results as JSON for scripting |
Making Your App Discoverable
For the CLI to find your application, call .WithDiagnostics() on your terminal builder:
using Hex1b;
await using var terminal = Hex1bTerminal.CreateBuilder()
.WithHex1bApp((app, options) => ctx =>
ctx.Text("Hello from Hex1b!"))
.WithDiagnostics()
.Build();
await terminal.RunAsync();
Scripting and CI
The CLI is designed for scriptability. Use --json for machine-readable output and assert for CI checks:
hex1b terminal start -- ./my-app
hex1b assert abc --text-present "Welcome" --timeout 30
hex1b keys abc --text "admin"
hex1b keys abc --key Enter
hex1b assert abc --text-present "Dashboard"
hex1b capture screenshot abc --format svg --output result.svg
hex1b capture screenshot abc --format png --output result.png
hex1b terminal stop abc
Requirements
- .NET 10.0 or later
- Windows, Linux, or macOS
Documentation
- CLI Guide — Getting started and use cases
- CLI Reference — Complete command reference
- GitHub Repository
License
MIT — See LICENSE file in the repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.165.0-alpha.1331.1.b11d534 | 43 | 6/5/2026 |
| 0.165.0-alpha.1325.1.e6f8a29 | 35 | 6/3/2026 |
| 0.165.0-alpha.1322.1.62b3bb3 | 34 | 6/3/2026 |
| 0.165.0-alpha.1316.1.5401318 | 37 | 6/3/2026 |
| 0.165.0-alpha.1314.1.33573c1 | 38 | 6/3/2026 |
| 0.164.2-beta.1321.1.7522404 | 33 | 6/3/2026 |
| 0.164.1 | 85 | 6/3/2026 |
| 0.164.0 | 81 | 6/3/2026 |
| 0.164.0-beta.1308.1.3837d3a | 38 | 6/3/2026 |
| 0.164.0-alpha.1304.1.ddc2032 | 43 | 6/2/2026 |
| 0.163.0 | 83 | 6/2/2026 |
| 0.162.0 | 98 | 6/1/2026 |
| 0.161.0 | 106 | 5/29/2026 |
| 0.160.0 | 93 | 5/29/2026 |
| 0.159.0 | 94 | 5/24/2026 |
| 0.158.0 | 94 | 5/24/2026 |
| 0.157.0 | 95 | 5/24/2026 |
| 0.156.0 | 96 | 5/24/2026 |
| 0.155.0 | 93 | 5/24/2026 |
| 0.154.0 | 116 | 5/12/2026 |