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

The CLI reads WH_TOKEN (authentication), WARMHUB_REPO / WARMHUB_ORG (default repo target), WARMHUB_API_URL (backend URL), and WH_PROFILE (auth profile), plus a few behavior toggles. See Environment Variables for the full list, accepted values, and precedence rules.

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

Live updates by polling — re-runs the query periodically and 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. A handful of verbs accept an alias — for example, wh auth whoami resolves to wh auth status. There is no general show/get aliasing; use the canonical verb shown in the command reference. A mistyped verb returns a “did you mean?” suggestion rather than silently resolving.

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
NeedPage
Every domain, verb, flag, and aliasCommand Reference
Build and submit a multi-operation writecommit submit deep dive
Install the CLI as part of first-run setupQuickstart