Hex1b.Tool 0.174.0

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global Hex1b.Tool --version 0.174.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Hex1b.Tool --version 0.174.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Hex1b.Tool&version=0.174.0
                    
nuke :add-package Hex1b.Tool --version 0.174.0
                    

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.

NuGet License: MIT

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

License

MIT — See LICENSE file in the repository.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.176.0 97 11/11/2026
0.176.0-beta.2071.1.1976946 55 11/9/2026
0.175.0 152 10/15/2026
0.175.0-alpha.1963.1.e84f086 77 10/14/2026
0.175.0-alpha.1905.1.34394d2 86 10/13/2026
0.175.0-alpha.1898.1.9dc034e 88 10/11/2026
0.174.0 127 10/11/2026
0.174.0-beta.1899.1.9dc034e 85 10/11/2026
0.174.0-alpha.1835.1.1856406 81 10/11/2026
0.173.0 174 10/8/2026
0.173.0-alpha.1824.1.98d8766 730 10/4/2026
0.173.0-alpha.1801.1.3dc2d9b 83 10/4/2026
0.172.0 3,619 9/27/2026
0.172.0-beta.1788.1.f01b043 88 9/27/2026
0.172.0-alpha.1787.1.f01b043 1,330 9/26/2026
0.172.0-alpha.1785.1.d253961 495 9/25/2026
0.172.0-alpha.1654.1.f826137 510 9/25/2026
0.172.0-alpha.1652.1.6a01c54 85 9/22/2026
0.172.0-alpha.1650.1.2df4512 87 9/22/2026
0.171.0 2,720 9/22/2026
Loading failed