Commands

Top-level help is always one keystroke away:

autocom --help
autocom <command> --help
autocom <command> <subcommand> --help

This page is the human-curated reference. The output of --help is the source of truth — flag names and defaults are guaranteed to match the binary.

Global flags

These work on every command:

Flag Description
--api-url <url> Override the configured API base URL for this invocation
--tenant <slug> Override the configured tenant for this invocation
-o, --output <fmt> One of table, json, yaml
--config <path> Path to config file (or set AUTOCOM_CONFIG)
--no-color Disable ANSI styling (or set NO_COLOR=1)
-v, --verbose Verbose logging (planned)
-h, --help Help for this command

auth

Manage CLI authentication. See Authentication for the deep dive.

auth login

autocom auth login [flags]

Default flow opens your browser to the platform's OAuth approval page (PKCE-protected, RFC 7636), redirects to a 127.0.0.1:<port>/callback listener, and exchanges the code for an access token.

Flag Description
--tenant <slug> Default tenant slug to send with subsequent commands
--api-url <url> API base URL (also persisted to config)
--client-id <uuid> OAuth client ID (defaults to AUTOCOM_CLIENT_ID or build-time default)
--no-browser Skip browser launch — print URL and prompt for paste-back
--with-token <PAT> Skip OAuth — supply a personal access token directly
--token-stdin Read token from stdin (use with --with-token= empty)
--timeout <secs> OAuth timeout (default 300)

auth logout

autocom auth logout

Forgets credentials for the current api_url. Removes from BOTH keychain and file fallback.

auth whoami

autocom auth whoami       # or top-level: `autocom whoami`

Reads the stored credential — no network round-trip. Shows name, email, api url, tenant, and a warning if the token has expired.

tenants

autocom tenants list                  # list memberships
autocom tenants use <slug>            # set default tenant

orders

Day-to-day order operations. Resolves through the GraphQL gateway via auto-derived orders_* fields (Bus::call('Orders', 'orders.<method>', ...)).

orders list

autocom orders list [--status <status>] [--limit <n>]
Flag Default Description
--status Filter: pending, confirmed, processing, ready_to_ship, shipped, out_for_delivery, delivered, cancelled, failed
--limit 20 Max rows to return
autocom orders list                                          # default 20 rows
autocom orders list --status pending --limit 50
autocom orders list -o json | jq '.[] | {id, total}'
autocom orders list -o yaml > orders-snapshot.yaml

orders get

autocom orders get <order-id-or-number>

Detail view. v1 always renders JSON because module SDL fragments aren't shipped yet — typed table view lands in v1.2.

orders cancel

autocom orders cancel <order-id> [--reason <text>]

Sets status to cancelled. Reason is sent to notification rules — visible to the customer if their notification template includes it.

api

Raw GraphQL access — escape hatch for anything not yet wrapped in a friendly subcommand.

api query

autocom api query [QUERY] [flags]

The query body comes from one of (priority order):

autocom api query '{ _schema { ring } }'                     # positional arg
autocom api query -f my-query.graphql                        # file
autocom api query --stdin <<< '{ _schema { ring } }'         # stdin
autocom api query --persisted abc123def456...                # registered hash

Variables can be JSON inline or from a file:

autocom api query -f q.graphql -V '{"id":"abc"}'
autocom api query -f q.graphql --variables-file vars.json
Flag Description
-f, --file <path> Read query from file
--stdin Read query from stdin
-V, --variables <json> Inline JSON variables
--variables-file <path> Read variables from JSON file
--persisted <hash> Execute by sha256 hash — skips the query body

The full GraphQL response envelope is emitted on stdout. Pipe through jq for the data path you want.

config

Read and write CLI configuration. See Configuration for the key reference.

autocom config get <key>
autocom config set <key> <value>
autocom config list

health

autocom health

Anonymous probe of <host>/api/health. Reports ring, lock_path, and per-service status (database: up, redis: up). Useful as a CI gate to confirm an API is reachable before running the rest of a pipeline.

version

autocom version

Prints version + git commit + build date. Build identity is injected at link time — see Installation → From source.

upgrade

Self-update — see Upgrading & Versioning for the full flow.

autocom upgrade --check                        # what's available
autocom upgrade                                # apply latest
autocom upgrade --target 1.2.3                 # specific version
autocom upgrade --dry-run                      # verify but don't replace
autocom upgrade --force                        # reinstall over current
Flag Description
--check Read-only — print version comparison + release notes excerpt
--force Reinstall even when already on latest
--target <ver> Install a specific version (default: latest)
--dry-run Download + verify SHA256 but skip the binary replace
--allow-homebrew Bypass the Homebrew-install guard

whoami

Top-level alias for autocom auth whoami. See above.

completion

Cobra-generated shell completions:

autocom completion bash
autocom completion zsh
autocom completion fish
autocom completion powershell

See Installation → Shell completion for install paths.

Exit codes

Stable across versions — see Troubleshooting → Exit codes.