CLI

Install, global flags, output, exit codes, and a guide to the full CLI command reference

axhub is the official CLI for working with axhub from the terminal, CI, and agents.

Every command and flag is also available via axhub --json-schema. This reference is generated from that output, so it always matches the installed CLI. For the last-mile details, axhub <command> --help is always current.

Install

macOS / Linux
curl -fsSL https://cli.axhub.ai/install.sh | bash
axhub --version
Windows PowerShell
irm https://cli.axhub.ai/install.ps1 | iex
axhub --version

Global flags

Options you can add to any command. Most also accept an environment variable.

FlagDescription
--profile <name>Profile to use (AXHUB_PROFILE)
--tenant <company>Target company (tenant) (AXHUB_TENANT)
--jsonEmit results as JSON (AXHUB_JSON)
-y, --yesAuto-approve confirmation prompts (AXHUB_YES)
--no-inputDisable interactive input — for agents/CI (AXHUB_NO_INPUT)
--no-keychainUse file-backed credentials instead of the OS keychain (AXHUB_NO_KEYCHAIN)
--endpoint <URL>API endpoint (AXHUB_ENDPOINT)
--timeout <duration>Request timeout, e.g. 30s (AXHUB_TIMEOUT, default 30s)
--idempotency-key <UUID>Idempotency key for safe retries (AXHUB_IDEMPOTENCY_KEY)
--no-colorDisable colored output (AXHUB_NO_COLOR)
-v, --debugDebug logs (AXHUB_DEBUG)

Output format

With --json, every result uses the same envelope — data on success, error on failure.

{ "data": { /* ... */ } }
{ "error": { "category": "...", "code": "...", "request_id": "...", "hint": "..." } }

Agents should branch on error.code and the exit codes below rather than the human-readable message.

Exit codes

CodeMeaningWhat to do
0Success
1Generic errorLocal I/O, etc.
2Invalid usageCheck args/flags
4Auth requiredaxhub auth login
5Not foundCheck the target id/slug
6Rate limitedRetry shortly
7API errorCheck message/request_id
8Tenant scope errorCheck the active company
9ConflictAlready exists/settled — change args
10TimeoutRetry
11Dry-run blockedAdd --execute
12Domain blockedInvite email domain policy violation
13Invitation expiredSend a new invitation

Command reference

Each page lists every subcommand and flag.