> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kombify.io/llms.txt
> Use this file to discover all available pages before exploring further.

# homelab api CLI reference

> Every homelab api command, its options and exit codes

> [!NOTE]
>
> Generated from the Homelab v0.49.2 release (source `2614eaba28d8`). For an installed version, `homelab api <command> --help` is authoritative.

`homelab api` calls the Homelab API exactly as the [API reference](#api-reference) describes it: one command per public operation, generated from the release's API contract. Every command prints JSON on stdout with the response envelope removed; errors go to stderr as the structured error object.

## Authentication

| Variable | Meaning |
| - | - |
| `HOMELAB_API_URL` | API base URL. Defaults to `https://api.kombify.io/v1/homelab`; set it to the address of your own Homelab instance to call that instance directly. |
| `HOMELAB_API_TOKEN` | Bearer token sent with every request. Without it the CLI uses the session stored by `homelab login`, and fails with exit code 3 when there is none or it has expired. |

## Universal options

| Option | Applies to | Description |
| - | - | - |
| `--fields <paths>` | every command | Comma-separated dotted paths to keep in the output; applied per element for arrays. |
| `--ndjson` | every command | Print arrays as one compact JSON value per line. |
| `--dry-run` | mutating commands | Print the resolved request as JSON without authorizing or sending it. |
| `--idempotency-key <key>` | mutating commands | Idempotency-Key header; defaults to a fresh UUID. |
| `--body <json\|@path\|->` | commands with a JSON body | Base request body as a literal, a file or stdin; argument flags override its properties. |
| `--file <path\|->` | commands with a file body | Request body file sent with the declared content type. |
| `--yes` | commands that need confirmation | Confirm without a prompt; required when not interactive. |

Commands marked as requiring confirmation ask for `yes` in a terminal. Without a terminal they refuse to send the request unless `--yes` is set, print a `CONFIRMATION_REQUIRED` error and exit with code 9.

## Exit codes

| Code | Meaning |
| - | - |
| 0 | Success. |
| 1 | Any other failure. |
| 2 | Invalid input (HTTP 400/422). |
| 3 | Not authenticated (HTTP 401). |
| 4 | Denied, payment required or rate limited (HTTP 402/403/429). |
| 5 | Not found (HTTP 404). |
| 6 | Conflict (HTTP 409). |
| 7 | Server or transport failure (HTTP 5xx). |
| 9 | Confirmation required or declined. |

## Agent context

`homelab api agent-context` prints this command catalog for AI agents as Markdown, or as JSON with `--json`: every command with its usage, arguments, confirmation, availability and MCP tool name, plus the universal options and exit codes above.

## Commands

| Command group | Covers |
| - | - |
| [`homelab api addons`](https://docs.kombify.io/homelab/reference/cli/addons) | Add-ons |
| [`homelab api agents`](https://docs.kombify.io/homelab/reference/cli/agents) | Agents |
| [`homelab api auth`](https://docs.kombify.io/homelab/reference/cli/auth) | Auth |
| [`homelab api autoinstall`](https://docs.kombify.io/homelab/reference/cli/autoinstall) | Health |
| [`homelab api client-pairing`](https://docs.kombify.io/homelab/reference/cli/client-pairing) | Client Binding |
| [`homelab api device-readiness`](https://docs.kombify.io/homelab/reference/cli/device-readiness) | Discovery |
| [`homelab api discovery`](https://docs.kombify.io/homelab/reference/cli/discovery) | Discovery |
| [`homelab api drift`](https://docs.kombify.io/homelab/reference/cli/drift) | Stacks - Drift |
| [`homelab api failures`](https://docs.kombify.io/homelab/reference/cli/failures) | Jobs |
| [`homelab api features`](https://docs.kombify.io/homelab/reference/cli/features) | Features |
| [`homelab api health`](https://docs.kombify.io/homelab/reference/cli/health) | Health |
| [`homelab api home-assistant`](https://docs.kombify.io/homelab/reference/cli/home-assistant) | Services |
| [`homelab api homelab`](https://docs.kombify.io/homelab/reference/cli/homelab) | Jobs, Stacks |
| [`homelab api install-scripts`](https://docs.kombify.io/homelab/reference/cli/install-scripts) | Workers |
| [`homelab api instance`](https://docs.kombify.io/homelab/reference/cli/instance) | Instance |
| [`homelab api inventory`](https://docs.kombify.io/homelab/reference/cli/inventory) | Inventory |
| [`homelab api jobs`](https://docs.kombify.io/homelab/reference/cli/jobs) | Jobs |
| [`homelab api managed-runtimes`](https://docs.kombify.io/homelab/reference/cli/managed-runtimes) | Jobs, Stacks |
| [`homelab api monitor`](https://docs.kombify.io/homelab/reference/cli/monitor) | Metrics |
| [`homelab api monthly-runtimes`](https://docs.kombify.io/homelab/reference/cli/monthly-runtimes) | Jobs, Monthly Runtime, Stacks |
| [`homelab api notifications`](https://docs.kombify.io/homelab/reference/cli/notifications) | Auth |
| [`homelab api onboarding`](https://docs.kombify.io/homelab/reference/cli/onboarding) | Stacks |
| [`homelab api operator`](https://docs.kombify.io/homelab/reference/cli/operator) | Unifier |
| [`homelab api pairing-tokens`](https://docs.kombify.io/homelab/reference/cli/pairing-tokens) | Trust |
| [`homelab api provider-operations`](https://docs.kombify.io/homelab/reference/cli/provider-operations) | Servers |
| [`homelab api registry`](https://docs.kombify.io/homelab/reference/cli/registry) | Services |
| [`homelab api ril`](https://docs.kombify.io/homelab/reference/cli/ril) | Inventory, RIL |
| [`homelab api runtime`](https://docs.kombify.io/homelab/reference/cli/runtime) | Runtime |
| [`homelab api servers`](https://docs.kombify.io/homelab/reference/cli/servers) | Inventory, Jobs, RIL, Servers |
| [`homelab api services`](https://docs.kombify.io/homelab/reference/cli/services) | Jobs, Services |
| [`homelab api stack-identity`](https://docs.kombify.io/homelab/reference/cli/stack-identity) | Auth |
| [`homelab api stackkits`](https://docs.kombify.io/homelab/reference/cli/stackkits) | StackKits |
| [`homelab api stacks`](https://docs.kombify.io/homelab/reference/cli/stacks) | Inventory, Jobs, Stacks, Stacks - Drift, Stacks - Import/Export, Stacks - Specs, Workers |
| [`homelab api substrates`](https://docs.kombify.io/homelab/reference/cli/substrates) | Servers |
| [`homelab api system`](https://docs.kombify.io/homelab/reference/cli/system) | Health, Metrics |
| [`homelab api system-accounts`](https://docs.kombify.io/homelab/reference/cli/system-accounts) | Auth |
| [`homelab api tunnel`](https://docs.kombify.io/homelab/reference/cli/tunnel) | Tunnel |
| [`homelab api unifier`](https://docs.kombify.io/homelab/reference/cli/unifier) | Unifier |
| [`homelab api wallet`](https://docs.kombify.io/homelab/reference/cli/wallet) | Wallet |
| [`homelab api wizard`](https://docs.kombify.io/homelab/reference/cli/wizard) | Jobs, Stacks |
| [`homelab api workers`](https://docs.kombify.io/homelab/reference/cli/workers) | Workers |

## API reference

The Homelab API reference in this section is generated from the same release's public OpenAPI document.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.