Hex1b.Tool 0.122.0

dotnet tool install --global Hex1b.Tool --version 0.122.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.122.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Hex1b.Tool&version=0.122.0
                    
nuke :add-package Hex1b.Tool --version 0.122.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 a terminal running bash
hex1b terminal start -- bash

# 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
  • Linux or macOS (PTY support via native interop)

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.122.0 39 3/19/2026
0.121.0 70 3/19/2026
0.120.0 64 3/19/2026
0.119.0 66 3/19/2026
0.118.0 85 3/14/2026
0.117.0 81 3/14/2026
0.116.0 80 3/13/2026
0.115.0 83 3/13/2026
0.114.0 90 3/11/2026
0.113.0 86 3/11/2026
0.112.0 83 3/10/2026
0.111.0 78 3/10/2026
0.110.0 80 3/9/2026
0.109.0 82 3/8/2026
0.108.0 78 3/7/2026
0.107.0 78 3/6/2026
0.106.0 84 3/4/2026
0.105.0 75 3/4/2026
0.104.0 81 3/3/2026
0.103.0 81 3/2/2026
Loading failed