hxtp-cli
Go CLI for device management â primary production CLI.
Installationâ
From Releaseâ
# Linux/macOS
curl -sL https://github.com/hestialabs/hxtp/releases/latest/download/hxtp-linux-amd64 -o hxtp
chmod +x hxtp
# macOS
brew install hxtp
From Sourceâ
git clone https://github.com/hestialabs/hxtp
cd hxtp/cli/hxtp-cli
go build -o hxtp ./cmd/hxtp
Quick Startâ
# Login (browser-based OAuth)
hxtp login
# Provision a device interactively (Generates Ed25519 Identity)
hxtp device create
# Send command (Signed with Cloud Root Key)
hxtp send <device-id> toggle_led -p value=true
Commandsâ
hxtp loginâ
Initiates OAuth handshake or manual token input:
hxtp login [--url https://api.hestialabs.in/api/v1]
Flow:
- Generates 256-bit handshake ID
- Opens browser to
/auth/cli?code={id} - Polls for JWT token
- Stores in system keyring
Environment: HXTP_TOKEN for CI/CD
hxtp sendâ
Send an Ed25519 signed command to a device:
hxtp send <device-id> <action> [-p key=value] [--transport rest|mqtt|ws] [--dry-run]
Example:
# Send via native MQTT for sub-millisecond latency
hxtp send abc123 toggle_led -p value=true --transport mqtt
Options:
-p, --paramâ Key-value parameters (can be specified multiple times)--transportâ Network delivery mechanism (REST is default, MQTT for low-latency)--dry-runâ Preview action without execution against safety rules
hxtp confirmâ
Confirm and execute a critical action that returned dry_run_required during a dry run:
hxtp confirm <device-id> <dry-run-token>
hxtp device createâ
Starts an interactive TUI to provision a new device on the network. In HxTP/3.1, this initiates the Ed25519 identity generation.
hxtp device create [--type <manifest-type>] [--home-id <uuid>]
Configurationâ
Keyring Storageâ
Credentials stored in OS keyring:
| Service | Account |
|---|---|
io.hxtp.cli | main-token |
io.hxtp.cli | client-id |
io.hxtp.cli | cloud-root-key |
Config Fileâ
~/.hxtp/config.json:
{
"api_url": "https://api.hestialabs.in",
"tenant_id": "tenant-uuid",
"client_id": "unique-client-id",
"last_login": "2026-01-01T00:00:00Z"
}
Mode: 0600 (user-only)
Securityâ
- Credentials in OS keyring (never plaintext)
- Config in
~/.hxtp/(600 perms) - HTTPS-only API
- Bit-perfect HxTP/3.1 Ed25519 signing
- Supports CI/CD via
HXTP_TOKEN
TUIâ
Interactive prompts use Charmbracelet libraries:
charmbracelet/huhâ promptscharmbracelet/lipglossâ styling
# Verbose output
hxtp --verbose login
Global Flagsâ
| Flag | Description |
|---|---|
--url | API base URL |
--transport | Network transport (rest, mqtt, ws) |
--verbose | Verbose output |
--version | Show version |
JavaScript CLI (@hxtpctl-js)â
A lightweight, Bun/Node-based alternative to the Go CLI, optimized for frontend developers and automation scripts.
Installationâ
bun add -g @hestialabs/hxtpctl
Usageâ
The JS CLI follows the same command patterns as the Go CLI:
# Send command via WebSockets
hxtpctl send <device-id> toggle_led --transport ws
# List devices
hxtpctl list
Featuresâ
- Native Bun Support: Ultra-fast startup and execution.
- Protocol Parity: Uses
hxtp-jsfor bit-perfect HxTP/3.1 signing. - Cross-Platform: Works anywhere Node.js or Bun is available.
CI/CDâ
# Using environment variable
HXTP_TOKEN=eyJhbGci... hxtp device list
# Logout (clear keyring)
hxtp logout