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.
Installation
Section titled “Installation”The CLI is currently published to GitHub:
echo "@warmhub:registry=https://npm.pkg.github.com" >> ~/.npmrcecho "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" >> ~/.npmrcnpm install -g @warmhub/cli@nextwh --versionAfter installing, wh is available everywhere.
Architecture
Section titled “Architecture”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.
Command Pattern
Section titled “Command Pattern”All commands follow the wh <domain> <verb> pattern:
wh org create myorgwh repo list myorgwh thing head --shape Locationwh 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.
Configuration
Section titled “Configuration”Default Repo (.wh file)
Section titled “Default Repo (.wh file)”The easiest way to set a default repo is wh use, which writes a .wh file in the current directory:
wh use myorg/worldwh thing head # targets myorg/worldThe CLI resolves the target repo using this priority:
--repoflag (per-command override)WARMHUB_REPOenvironment variable.whfile in the current directory
Environment Variables
Section titled “Environment Variables”| Variable | Description | Example |
|---|---|---|
WARMHUB_REPO | Default org/repo for all commands | myorg/myrepo |
WARMHUB_ORG | Default org | myorg |
WARMHUB_API_URL | Backend URL | https://api.warmhub.ai |
Per-Command Override
Section titled “Per-Command Override”wh thing head --repo myorg/other-repoOutput Formats
Section titled “Output Formats”Default (Human-Readable)
Section titled “Default (Human-Readable)”Colored, formatted text output:
wh thing headStructured output for scripts and agents:
wh thing head --jsonLive (Reactive)
Section titled “Live (Reactive)”Real-time WebSocket updates — auto-refreshes as data changes:
wh thing head --liveErgonomics
Section titled “Ergonomics”Prefix expansion. Flag prefixes expand to the full name if unambiguous:
wh repo create myorg/repo --desc "My repo"# expands to --descriptionFuzzy matching. Typos in domains, verbs, and flags get “did you mean?” suggestions.
Verb aliases. Many verbs have short aliases:
wh commit log # alias for: wh commit listwh thing show # alias for: wh thing viewwh repo init # alias for: wh repo createGetting Help
Section titled “Getting Help”wh help # full help overviewwh <domain> # list verbs for a domainwh <domain> <verb> --help # verb details with flags and exampleswh help --format json # full CLI spec as JSONwh doctor # verify environment and connectivity