Skip to content

CLI Overview

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

The CLI requires Node 22+.

Terminal window
npm install -g @warmhub/cli
wh --version

After installing, wh is available everywhere. See the Quickstart for the full walkthrough.

Use wh use to set the repo for a working directory, pass --repo org/name when a script should be explicit, and add --json when another tool needs structured output. Most commands accept a repo from the current .wh file, the active profile, or a flag.

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

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

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

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 list # 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
WH_PROFILENamed auth profile (same as --profile / -P)staging
WARMHUB_CLI_HTTP_TIMEOUT_MSHTTP client headers/body timeout in milliseconds for long-running requests (Node only; no-op under Bun). Default 5700000 (95 minutes). Set to 0 for unlimited.3600000
WARMHUB_CLI_NO_UPDATE_CHECKDisable the background CLI update check. Set to 1, true, or TRUE to enable the opt-out. Equivalent to passing --no-update-check.1
Terminal window
wh thing list --repo myorg/other-repo

Colored, formatted text output:

Terminal window
wh thing list

Structured output for scripts and agents:

Terminal window
wh thing list --json

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

Terminal window
wh thing list --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 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 # structured CLI spec as JSON
wh doctor # verify environment and connectivity