Skip to content

CLI Overview

The wh CLI is the primary human interface for interacting with WarmHub. It covers all operations — creating repos, committing data, querying state, and bootstrapping agent context.

The CLI is currently published to GitHub:

Terminal window
echo "@warmhub:registry=https://npm.pkg.github.com" >> ~/.npmrc
echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" >> ~/.npmrc
Terminal window
npm install -g @warmhub/cli@next
wh --version

After installing, wh is available everywhere.

The CLI has two layers:

  • Command engine — command handlers, parsing, formatting, and typed errors.
  • Executable entry point — stdio wiring, signal handling, and process exit behavior.

All commands follow the wh <domain> <verb> pattern:

Terminal window
wh org create myorg
wh repo list myorg
wh thing head --shape Location
wh commit create --ops '[...]'

Domains: org, repo, shape, thing, assertion, commit, workspace, use, init, doctor, sub, auth, token, credential, component, prime, notifications

See the full command reference for every domain, verb, flag, and alias.

The easiest way to set a default repo is wh use, which writes a .wh file in the current directory:

Terminal window
wh use myorg/world
wh thing head # targets myorg/world

The CLI resolves the target repo using this priority:

  1. --repo flag (per-command override)
  2. WARMHUB_REPO environment variable
  3. .wh file in the current directory
VariableDescriptionExample
WARMHUB_REPODefault org/repo for all commandsmyorg/myrepo
WARMHUB_ORGDefault orgmyorg
WARMHUB_API_URLBackend URLhttps://api.warmhub.ai
Terminal window
wh thing head --repo myorg/other-repo

Colored, formatted text output:

Terminal window
wh thing head

Structured output for scripts and agents:

Terminal window
wh thing head --json

Real-time WebSocket updates — auto-refreshes as data changes:

Terminal window
wh thing head --live

Prefix expansion. Flag prefixes expand to the full name if unambiguous:

Terminal window
wh repo create myorg/repo --desc "My repo"
# expands to --description

Fuzzy matching. Typos in domains, verbs, and flags get “did you mean?” suggestions.

Verb aliases. Many verbs have short aliases:

Terminal window
wh commit log # alias for: wh commit list
wh thing show # alias for: wh thing view
wh repo init # alias for: wh repo create
Terminal window
wh help # full help overview
wh <domain> # list verbs for a domain
wh <domain> <verb> --help # verb details with flags and examples
wh help --format json # full CLI spec as JSON
wh doctor # verify environment and connectivity