K

CLI

Install, global flags, exit codes, and every command the axhub CLI offers

axhub is the official CLI for working with axhub from the terminal, CI, and agents. This page collects the rules that apply to every command — installation, global options, the JSON output envelope, and exit codes. After that, every command is listed, grouped by purpose. Installing the CLI for the first time and shipping your first app? Follow the Quickstart first.

Every command and flag is also available via axhub --json-schema. This reference is generated from that output (currently v0.30.0). 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 options

These work on any command; most can also be set via environment variables.

OptionDescription
--profile <name>Profile to use (AXHUB_PROFILE)
--tenant <tenant>Target tenant (AXHUB_TENANT)
--jsonJSON output (AXHUB_JSON)
--field-expr <expr>Extract values from the JSON output with a jq-compatible expression
--field-expr-json <expr>Same, but print compact JSON
-y, --yesAuto-approve non-destructive confirmation prompts (AXHUB_YES)
--no-inputDisable interactive input — for agents/CI (AXHUB_NO_INPUT)
--non-interactiveFully non-interactive mode (AXHUB_NON_INTERACTIVE)
--no-keychainUse file-backed credentials instead of the OS keychain (AXHUB_NO_KEYCHAIN)
--token-file <path>OAuth token file path (AXHUB_TOKEN_FILE)
--api-key-file <path>PAT (API key) file path (AXHUB_API_KEY_FILE)
--config <path>CLI config file path (AXHUB_CONFIG)
--endpoint <URL>API endpoint (AXHUB_ENDPOINT)
--insecure-endpointAllow a non-HTTPS endpoint — development/testing only (AXHUB_INSECURE_ENDPOINT)
--timeout <duration>Request timeout, e.g. 30s (AXHUB_TIMEOUT)
--idempotency-key <UUID>Idempotency key for agent-safe mutation retries (AXHUB_IDEMPOTENCY_KEY)
--agent-error-guideEmit an agent-friendly error guide to stderr
--otlp-endpoint <URL>OTLP collector endpoint for opt-in agent telemetry (AXHUB_OTLP_ENDPOINT)
--completions <shell>Print shell completions (same as the completion subcommand)
--json-schemaExport the full CLI surface as a JSON schema — for agents and CI drift checks
--no-colorDisable colored output (AXHUB_NO_COLOR)
--tracePrint request traces
-v, --debugDebug logs (AXHUB_DEBUG)
--versionPrint the version

Environment variables without a flag pair

VariableDescription
AXHUB_OUTPUT=jsonSame as --json
AXHUB_API_KEYInject the PAT value directly (instead of a file)
AXHUB_DISABLE_AUTOUPDATE=1Disable the CLI auto-update check
AXHUB_ALLOW_UNSIGNED=1 · AXHUB_REQUIRE_COSIGN=1Relax/enforce update signature verification (both set → exit 64)
AXHUB_USE_KEYCHAIN=1Force the OS keychain even under --no-input
AXHUB_INSTALL_DIRInstaller target directory
AXHUB_LOGTracing log filter

An AXHUB_TOKEN variable is never read. Inject tokens via --token-file (AXHUB_TOKEN_FILE) or a PAT (AXHUB_API_KEY).

Output format

With --json, every result uses the same envelope. status is one of ok · error · dry_run — previews report dry_run, not success.

{ "schema_version": "1", "status": "ok", "data": { /* ... */ } }
{ "schema_version": "1", "status": "error", "error": { "code": "...", "subcode": "...", "fields": [], "resource": "...", "doc_url": "..." } }

Agents should branch on error.code / error.subcode and the exit codes below, not on human-readable messages.

Exit codes

CodeMeaningWhat to do
0Success
1Generic failureLocal I/O, etc.
2Internal init failure (rare)Retry/diagnose — bad flags or commands exit with 64, not 2
4Unauthenticatedaxhub auth login
5Resource not foundCheck the target id/slug
6Rate-limitedRetry later
7API errorCheck the message and request_id
8Tenant scope failureCheck the active tenant
9ConflictAlready exists/settled — branch on error.subcode
10TimeoutRetry
11Dry-run blockedAdd --execute
12Domain blockedInvitation email domain policy violation
13Invitation expiredSend a new invitation
14Update digest mismatchTamper signal — abort install, reinstall
15Binary swap failedFinal step of update apply failed — retry or diagnose
64CLI-side usage/validation failureFix inputs and retry
66Update policy blockedBranch on error.subcode (downgrade vs cosign)

Every command

Everything available as of v0.30.0, grouped by purpose. Each row is a command you can actually type. Flags live in axhub <command> --help or in the group detail below.

Mutating commands preview by default. Any command whose description mentions "dry-run" shows you what would change and stops. Add --execute to actually apply it.

Sign-in & your account

CommandWhat it does
axhub auth loginSign in via the OAuth device flow
axhub auth logoutSign out and clear stored credentials
axhub auth statusShow current authentication status
axhub auth whoamiShow the currently authenticated user
axhub auth refreshRefresh the stored OAuth access token
axhub auth pat issueIssue a personal access token (PAT)
axhub auth pat listList your PATs
axhub auth pat revokeRevoke a PAT
axhub auth pat rotateRotate a PAT — revoke and reissue
axhub auth pat useSave a PAT as the active local credential
axhub auth pat unsetClear the stored active PAT
axhub auth pat whoamiShow who this PAT authenticates as
axhub auth oauth revokeRevoke an OAuth token
axhub auth oauth clientManage OAuth clients
axhub auth oauth consentManage OAuth consent grants
axhub auth idp listList the company's identity providers (SSO config)
axhub auth idp createCreate an IdP configuration
axhub auth idp updateUpdate an IdP's mutable fields
axhub auth idp enable · disableEnable or disable an IdP
axhub auth idp deleteDelete a disabled IdP
axhub auth idp providersList supported IdP types
axhub auth idp testTest an IdP configuration
axhub profile add · list · current · use · removeManage local CLI profiles
axhub config explainExplain the resolved config and where each value came from
axhub doctorDiagnose config, auth, and backend reachability locally

Company & people

CommandWhat it does
axhub tenants whoamiYour membership and role in the active company
axhub tenants list · getCompanies you belong to · one company's details
axhub tenants create · update · delete · restoreCreate, update, delete, restore a company
axhub tenants groups list · create · rename · deleteManage company groups (teams)
axhub tenants scim connectionShow SCIM connection status
axhub tenants scim issue-token · revoke-tokenIssue or revoke a SCIM token
axhub tenants google-directoryManage the Google Workspace directory connection
axhub tenants directory-syncSync the connected directory now
axhub tenants invite-linksCreate, list, and revoke invite links
axhub tenants icon set · clear · signSet, clear, or get an upload URL for the company icon
axhub tenants billing summary · entitlementsEstimated billing summary · limits
axhub tenants billing subscription · seats · payment-method · paymentsPlan, seats, payment method, payment history
axhub tenants billing creditsInspect and top up pay-as-you-go credits
axhub tenants agents hermesManage the company's hermes entitlement
axhub members list · me · resolveMember list · your membership · look up by email
axhub members set-roleChange a member's role
axhub members deactivate · reactivateDeactivate or reactivate a member
axhub members move-group · restore-scimChange team placement · return to directory sync
axhub members assign-seat · unassign-seatAssign or release a paid seat
axhub members directory · org-directoryRoster with team placement · org chart (read-only)
axhub invitations send · bulkSend one invitation · invite many at once
axhub invitations list · cancel · resend · acceptList, cancel, resend, accept invitations

Apps

CommandWhat it does
axhub apps list · mine · owned · received · workspaceApp lists — accessible, yours, received, workspace
axhub apps get · search · discoverApp details · search · browse public apps
axhub apps create · fork · updateCreate, fork, update app metadata
axhub apps check-availabilityCheck whether an app slug is free
axhub apps bootstrap · bootstrap-statusBootstrap from a template or repo · check progress
axhub apps templates listList available bootstrap templates
axhub apps detectDetect build settings in a GitHub repo (read-only)
axhub apps suspend · resumeSuspend or resume an app
axhub apps archive · reactivateArchive or un-archive an app
axhub apps delete · purgeDelete · permanently purge an app
axhub apps membersList an app's members
axhub apps co-ownersManage co-owners (list, add, remove)
axhub apps ownership transferHand over representative ownership — irreversible
axhub apps git connect · status · update · disconnectConnect a GitHub repo, check it, change branch, disconnect
axhub apps domains list · add · remove · verifyCustom domains — list, register, detach, re-check DNS
axhub apps storage status · enableStorage status · provision it
axhub apps storage ls · get-url · rmList objects · issue a download URL · delete
axhub apps raw-dbManage the app's own Postgres database
axhub apps static site · releases · deploy · authStatic hosting — site config, releases, deploy, protected auth
axhub apps resource-presetsBackend resource preset catalog
axhub apps inspection-consentShow or set code-inspection (LLM review) consent
axhub apps sign-icon-uploadGet a signed URL to upload an app icon
axhub initScaffold axhub.yaml in the current folder
axhub manifestParse and validate axhub.yaml
axhub openOpen an app or resource in the browser
axhub categories list · get · create · update · deleteManage app categories
axhub publishSubmit a request to publish an app
axhub review list · get · approve · reject · historyReview publish requests — list, detail, approve, reject, history
axhub github accounts listGitHub accounts and orgs visible to AxHub
axhub github installations reposRepositories for a GitHub App installation
axhub github repo createCreate a repository with your linked GitHub account
axhub github linkLink GitHub via the browserless device flow
axhub github completeComplete the GitHub App installation callback

Deploy

CommandWhat it does
axhub deploy createTrigger a deployment
axhub deploy statusLatest deployment status
axhub deploy verifyVerify a specific deployment actually succeeded
axhub deploy watchWatch a deployment until it finishes
axhub deploy list · releasesDeployment history · release history
axhub deploy logsView deployment logs
axhub deploy cancelCancel an in-progress deployment
axhub deploy rollbackRoll back to the deployment given by --from-deployment
axhub deploy fleetDeploy several apps in parallel
axhub deploy staging enable · disableTurn the staging environment on or off
axhub deploy promote-preflightPreview what promotion to production would change
axhub deploy promote · promote retryPromote to production · retry a failed promotion
axhub deploy scanSecurity scan report for a deployment
axhub deploy scan report-false-positiveReport one scan finding as a false positive
axhub deploy diagnoseDiagnose live rollout health
axhub deploy doctorDiagnose deployment readiness
axhub deploy git configure · connect · disconnect · statusConfigure, connect, disconnect, inspect the deploy git link
axhub deploy codesList deployment status codes and their meanings
axhub deploy explainExplain how config, auth, and the target app were resolved

Database & environment variables

CommandWhat it does
axhub tables list · getList dynamic tables · show one
axhub tables create · dropCreate or drop a table
axhub tables check-availability · column-typesCheck a table name · list supported column types
axhub tables columns add · removeAdd or remove a column
axhub tables rows insert · update · deleteInsert, update, delete a row
axhub tables grants list · issue · revokeTable access grants — list, issue, revoke
axhub tables db-list · db-rowsRaw tables and rows in the app's own DB (OAuth required)
axhub data list · count · getRead rows, count, fetch one via the /data API
axhub data insert · update · deleteInsert (--batch for JSONL), update, delete a row
axhub env list · getList environment variables · read one value
axhub env set · update · deleteCreate, update, delete an environment variable
axhub env set-staging-valueSet a staging-only value

Connectors, gateway & permissions

CommandWhat it does
axhub connectors list · show · mineConnector list (admin) · details · what you can use
axhub connectors create · update · deleteRegister, update, delete a connector
axhub connectors test-connectionProbe the external system with stored credentials
axhub connectors discover · resourcesTrigger discovery · show the discovered resource tree
axhub connectors app-dbExpose an app's own DB as a connector
axhub connectors google start · finalizeStart and finish Google Drive OAuth
axhub gateway session start · endStart or end a gateway session (8h)
axhub gateway queryRun guarded SQL through a session
axhub gateway invoke · document-invoke · file-invokeCall REST, document-store, and file-storage endpoints
axhub authz subjects list · show · createManage authorization subjects (groups, org units)
axhub authz presets list · show · create · update · deleteManage privilege presets
axhub authz policies list · show · create · update · deleteManage access policies (row filter, column allow/mask)
axhub authz grants list · show · create · revoke · mineGrant and revoke data access · list your own
axhub authz grants set-policiesReplace the policy set attached to a grant
axhub accessApp access — grant, revoke, list, invite collaborators
axhub sites create · list · showRegister, list, inspect private-network sites
axhub sites rotate-token · deleteRotate a site token · delete a site

AI, notifications & webhooks

CommandWhat it does
axhub axrouter statusAvailability per company and your consent state
axhub axrouter monitorTurn Claude Code prompt logging on (--off to turn off)
axhub axrouter consent · revoke-consentGive or withdraw body-collection consent
axhub axrouter revokeRelease enrollment and stop logging
axhub axrouter keys issue · list · revokeIssue, list, revoke AXRouter virtual API keys
axhub sdk searchSemantic search over SDK knowledge
axhub sdk recipeRender an SDK recipe, substituted for your app
axhub sdk validateStatically validate SDK usage in one file
axhub notifications list · readRead the inbox · mark notifications read
axhub notifications prefs list · setShow or change the kind×channel matrix
axhub relay list · create · deleteList, create, close inbound webhook endpoints
axhub relay rotate-key · deliveries · replayRotate the key · delivery history · replay
axhub agents hermes status · up · downYour hermes instance — status, start, delete

Tools & diagnostics

CommandWhat it does
axhub infra usage · usage-seriesCompany infrastructure usage · per-app usage series
axhub update check · applyCheck for a new release · install it
axhub whatsnewRelease notes
axhub completion bash · zsh · fish · powershellPrint shell completion scripts
axhub cache clearClear the local schema cache
axhub devLocal development helpers
axhub feedback -m "<message>"Report a CLI failure with diagnostics (--dry-run to preview)
axhub support diagnoseCollect a redacted diagnostics bundle for support
axhub tuiInteractive terminal dashboard

axhub axrouter keys requires an OAuth login (axhub auth login). Since v0.28.0 it obtains a 10-minute workspace-pinned console token via RFC 8693 token exchange, so a PAT (AXHUB_API_KEY) alone won't work. When both exist, the stored OAuth token is used automatically.

Group detail

When you need flags, arguments, and responses, use these. They aren't in the sidebar — only these links reach them.

The detail pages are pinned at v0.28.0 — for flag-level changes, axhub <command> --help is always current.

Migrating from older versions

  • Removed commandsaxhub resources, catalog, status, and engines no longer exist as of v0.24 (rejected with exit 64). Use connectors resources / gateway for catalog & resource browsing, and deploy status for deployment state.
  • Commands not listed above — a few platform-admin and internal commands (admin, audit, cost, email-domains) are hidden even from help. They still work but are not covered in the public reference.