# Underpost CLI

> underpost ci/cd cli v4.5.0

**Usage:** `underpost [options] [command]`

## Global options

| Option | Description |
| --- | --- |
| `-V, --version` | output the version number |
| `--profile <profile>` | Execution profile. One of: LIVE_CLUSTER, HERMETIC_BUILD, OFFLINE_DRY_RUN. LIVE_CLUSTER Full access: cluster and host mutation permitted. HERMETIC_BUILD Build outputs only: no cluster, host or network side effects. OFFLINE_DRY_RUN Nothing executes; every command is reported as intent. |
| `--context <context>` | The kubeconfig context this command and each command it starts reach, instead of environments.<env>.context of conf.cluster.json. No kubeconfig changes. |
| `--current-context` | Reach the current kubeconfig context when conf.cluster.json names no context for the environment. The first change verifies the cluster against environments.<env>.cluster and prints it. |
| `-h, --help` | display help for command |

## Commands

| Command | Description |
| --- | --- |
| [`new`](#underpost-new) | Initializes a new Underpost project, service, or configuration. |
| [`site`](#underpost-site) | Provisions sites in the configuration of a deployment: clients, host/path routes, and the existing APIs and components they use. Each operation prints its change plan and applies it as one change set. |
| [`client`](#underpost-client) | Builds client assets, single replicas, and/or syncs environment ports. |
| [`start`](#underpost-start) | Initiates application servers, build pipelines, or other defined services based on the deployment ID. |
| [`clone`](#underpost-clone) | Clones a repository into a directory that does not exist or is empty. |
| [`fetch`](#underpost-fetch) | Updates the remote-tracking refs of a repository; the working tree and the branches stay. |
| [`pull`](#underpost-pull) | Fast-forwards the current branch to a remote branch. Never merges, rebases or replaces: a diverged history fails and nothing changes. |
| [`push`](#underpost-push) | Publishes HEAD to a branch of a remote and logs the published commit. |
| [`sync`](#underpost-sync) | Replaces a managed checkout with the tip of a repository branch: origin is repointed, local commits of the branch, tracked changes and untracked files are discarded, ignored files stay. For deploy checkouts, never for working repositories. |
| [`discard`](#underpost-discard) | Lists the staged, unstaged and untracked changes under each path, with its repository root, and with --force discards them. |
| [`init`](#underpost-init) | Initializes a repository, or keeps the one there, with the commit identity of GITHUB_USERNAME and GITHUB_EMAIL. |
| [`status`](#underpost-status) | Reads the state of a repository; nothing changes. One query per call; the short status without one. |
| [`cmt`](#underpost-cmt) | Commits the staged changes with a Conventional Commit message: type(scope): description. |
| [`merge-dependabot`](#underpost-merge-dependabot) | Fetches origin and merges each origin/dependabot/* branch into the base branch, one at a time, and prints ok or failed for each. Local changes are stashed and come back, with the branch you were on; nothing is pushed. |
| [`github`](#underpost-github) | GitHub automation: workflows and repository metadata. |
| [`static`](#underpost-static) | Manages static build of page, bundles, and documentation with comprehensive customization options. |
| [`root`](#underpost-root) | Displays the root path of the npm installation. |
| [`ip`](#underpost-ip) | Displays the current public machine IP addresses. |
| [`cluster`](#underpost-cluster) | Manages Kubernetes clusters, defaulting to Kind cluster initialization. |
| [`deploy`](#underpost-deploy) | Manages application deployments, defaulting to deploying development pods. |
| [`secret`](#underpost-secret) | Workload secret store: SOPS/Age encrypted credentials projected as Kubernetes Secrets. |
| [`host`](#underpost-host) | Host configuration: the node-level operational environment shared by the cluster. |
| [`app`](#underpost-app) | Application environment: one deployment's runtime configuration. |
| [`state`](#underpost-state) | Runtime state: live container execution state, health and metrics, exported off-cluster. |
| [`image`](#underpost-image) | Manages Docker images, including building, saving, and loading into Kubernetes clusters. |
| [`install`](#underpost-install) | Quickly imports Underpost npm dependencies by copying them. |
| [`db`](#underpost-db) | Manages MariaDB and MongoDB databases: sealed backups in the object store, restores, verification and restore drills, retention, statistics, and collection operations. |
| [`metadata`](#underpost-metadata) | Manages cluster metadata operations, including import and export. |
| [`cron`](#underpost-cron) | Manages cron jobs: execute jobs directly or generate and apply K8s CronJob manifests. |
| [`fs`](#underpost-fs) | Uploads, pulls, or deletes Cloudinary assets and synchronizes the selected storage manifest. |
| [`monitor`](#underpost-monitor) | Manages health server monitoring, the cluster observability stack, and host dashboards. |
| [`event`](#underpost-event) | Dispatches operational events and provisions the monitoring rules that trigger them. |
| [`ssh`](#underpost-ssh) | Manages cluster scoped SSH credentials and sessions for remote access to cluster nodes or services. Users are registered in engine-private/deploy/conf.users.json and keys are stored in engine-private/deploy/users/<user>. |
| [`wireguard`](#underpost-wireguard) | Manages the WireGuard L3 hub-and-spoke transport and the HAProxy edge gateway in front of it. |
| [`haproxy`](#underpost-haproxy) | Manages the HAProxy edge gateway over the WireGuard transport (same subsystem as `underpost wireguard`). |
| [`vultr`](#underpost-vultr) | Meters the edge VPS bandwidth against its Vultr plan quota and blocks egress before overage accrues. |
| [`sandbox`](#underpost-sandbox) | The Development Sandbox: a local Kind cluster with MongoDB and Valkey, exposed on 127.0.0.1. It never resets a cluster, a database or a volume, and never stops a process it did not start. |
| [`namespace`](#underpost-namespace) | Kubernetes placement from engine-private/deploy/conf.cluster.json: the context, the DNS domain and the namespace of each resource, the live cluster against it, and its migration. Capture is not a backup. Only migrate moves a resource: it deletes the source installation, installs it again in its destination and restarts its consumers, one unit at a time; until a unit is ready in its destination every command reaches its source. Nothing here deletes a namespace or rewrites an environment file. |
| [`tls`](#underpost-tls) | TLS lifecycle: the ACME ClusterIssuer, the cert-manager Certificates, the TLS Secrets and self-signed TLS of the hosts the deployments declare. environments.<env>.tls of conf.cluster.json sets the mode. It never deletes a Certificate or a TLS Secret to renew it, and never changes a workload. |
| [`ingress`](#underpost-ingress) | Routing: which deployment declares each host, the Gateway or HTTPProxy that serves it, and the routing objects a deployment leaves where it no longer runs. It never removes a shared object or one it cannot prove it owns. |
| [`run`](#underpost-run) | Runs specified scripts using various runners. |
| [`test`](#underpost-test) | Runs the test projects locally, inside deployment pods, or as a cluster Job with Allure reporting. |
| [`docker-compose`](#underpost-docker-compose) | General-purpose Docker Compose development pipeline (mirrors the Kubernetes dev stack). |
| [`lxd`](#underpost-lxd) | Manages LXD virtual machines as K3s nodes (control plane or workers). |
| [`baremetal`](#underpost-baremetal) | Manages baremetal server operations, including installation, database setup, commissioning, and user management. |
| [`package`](#underpost-package) | Generates the package manifests a deploy id owns, from the engine manifest and the deploy's product catalog, and installs the dependencies that catalog pins. |
| [`socketsecurity`](#underpost-socketsecurity) | Security audit through the Socket.dev free plan: dependency security (advisories, supply chain alerts, free security patches in .socket/manifest.json) and source code risk (alerts on this project's own code). |
| [`graphify`](#underpost-graphify) | Builds the code graph of this checkout with the pinned Graphify release, code only. It commits GRAPH_REPORT.md and its stamp in docs/graphify-out. |
| [`release`](#underpost-release) | Release orchestrator for building new versions and deploying releases of the Underpost CLI. |
| [`source-release`](#underpost-source-release) | Source channels, the Release Job and the release store. |

## Command reference

## underpost new

Initializes a new Underpost project, service, or configuration.

**Usage:** `underpost new [options] [command] [app-name]`

### Arguments

| Argument | Description |
| --- | --- |
| `app-name` | The name of the new project. |

### Options

| Option | Description |
| --- | --- |
| `--deploy-id <deploy-id>` | Create deploy ID conf env files |
| `--sub-conf <sub-conf>` | Create sub conf env files |
| `--cluster` | Initialize the base cluster deploy folder engine-private/deploy from ./underpost.cluster.config.js: the users, WireGuard, event and cron conf files and a conf.cluster.json on one of its profiles. Existing files are kept. |
| `--placement <profile>` | With --cluster: the built-in profile conf.cluster.json selects. recommended (default): one namespace per responsibility for a new cluster; legacy: every resource where it has always run, to adopt an existing cluster. (default: "recommended") |
| `--build-repos` | Create deploy ID repositories |
| `--build` | Build the deployment to pwa-microservices-template (requires --deploy-id) |
| `--clean-template` | Clean the build directory (pwa-microservices-template) |
| `--sync-conf` | Sync configuration to private repositories (requires --deploy-id) |
| `--purge` | Remove deploy ID conf and all related repositories (requires --deploy-id) |
| `--dev` | Sets the development cli context |
| `--default-conf` | Write the conf manifest of --deploy-id (underpost.config.<deploy-id>.js) or of --conf-workflow-id (underpost.config.js). |
| `--conf-workflow-id <workflow-id>` | Set custom configuration workflow ID for conf generation |
| `-h, --help` | display help for command |

### Commands

| Command | Description |
| --- | --- |
| `api [options] <api-id>` | Generates a new API from a template API, and registers it in a deployment when one is named. |
| `ws [options] <ws-id>` | Generates a new WebSocket server from a template server, and binds it to routes when a deployment is named. |

---

## underpost new api

Generates a new API from a template API, and registers it in a deployment when one is named.

**Usage:** `underpost new api [options] <api-id>`

### Arguments

| Argument | Description |
| --- | --- |
| `api-id` | Id of the new API: src/api/<api-id> and src/client/services/<api-id>. |

### Options

| Option | Description |
| --- | --- |
| `--from <api-id>` | Template API the sources are generated from (default: default). |
| `--deploy-id <deploy-id>` | Registers the API in this deployment, as `underpost site add-api` does. |
| `--client <client-id>` | With --deploy-id: adds the API to the services of this client. |
| `--host <host>` | With --deploy-id: registers the API only on the routes of this hostname. |
| `--dry-run` | With --deploy-id: prints the registration plan without writing it. |
| `-h, --help` | display help for command |

---

## underpost new ws

Generates a new WebSocket server from a template server, and binds it to routes when a deployment is named.

**Usage:** `underpost new ws [options] <ws-id>`

### Arguments

| Argument | Description |
| --- | --- |
| `ws-id` | Id of the new WebSocket server: src/ws/<ws-id>. |

### Options

| Option | Description |
| --- | --- |
| `--from <ws-id>` | Template WebSocket server the sources are generated from (default: default). |
| `--deploy-id <deploy-id>` | Binds the server to routes of this deployment. |
| `--host <host>` | With --deploy-id: hostname of the routes. |
| `--paths <paths>` | With --deploy-id: comma-separated route paths (default: /). |
| `--dry-run` | With --deploy-id: prints the binding plan without writing it. |
| `-h, --help` | display help for command |

---

## underpost site

Provisions sites in the configuration of a deployment: clients, host/path routes, and the existing APIs and components they use. Each operation prints its change plan and applies it as one change set.

**Usage:** `underpost site [options] [command]`

### Options

| Option | Description |
| --- | --- |
| `-h, --help` | display help for command |

### Commands

| Command | Description |
| --- | --- |
| `create [options] <host>` | Creates a site: a cloned client, its primary route and its redirect route. |
| `clone-client [options] <from-client-id> <to-client-id>` | Clones a client under a new id: its conf.client.json and conf.ssr.json entries, components, services, SSR components, index module and public assets, and a route next to each route that serves the source client. |
| `clone-route [options] <from-route> <to-route>` | Clones a route and its development variants; the database name of a client route reads DB_NAME_<CLIENT>. |
| `add-api [options] <api-id>` | Registers an existing API on every route that serves APIs (a non-empty apis list), in the development variants and replicas of the deployment. |
| `add-component [options] <component-id>` | Registers a client component in the component lists of the deployment and its replicas. |
| `help [command]` | display help for command |

---

## underpost site create

Creates a site: a cloned client, its primary route and its redirect route.

**Usage:** `underpost site create [options] <host>`

### Arguments

| Argument | Description |
| --- | --- |
| `host` | Site hostname. The site serves www.<host> and redirects <host> to it. |

### Options

| Option | Description |
| --- | --- |
| `--client <client-id>` | Id of the new client. |
| `--deploy-id <deploy-id>` | Deployment the site is created in. |
| `--path <path>` | Route path of both hostnames. (default: "/") |
| `--from <client-id>` | Source client the new client is cloned from. (default: "default") |
| `--from-deploy-id <deploy-id>` | Deployment of the source client (default: the default template). |
| `--replace` | Replaces different entries at the two site routes. |
| `--dry-run` | Prints the change plan without writing it. |
| `-h, --help` | display help for command |

---

## underpost site clone-client

Clones a client under a new id: its conf.client.json and conf.ssr.json entries, components, services, SSR components, index module and public assets, and a route next to each route that serves the source client.

**Usage:** `underpost site clone-client [options] <from-client-id> <to-client-id>`

### Arguments

| Argument | Description |
| --- | --- |
| `from-client-id` | Source client. |
| `to-client-id` | New client. |

### Options

| Option | Description |
| --- | --- |
| `--deploy-id <deploy-id>` | Deployment the clone is created in. |
| `--from-deploy-id <deploy-id>` | Deployment of the source client (default: --deploy-id). |
| `--replace` | Replaces different entries at the clone routes. |
| `--dry-run` | Prints the change plan without writing it. |
| `-h, --help` | display help for command |

---

## underpost site clone-route

Clones a route and its development variants; the database name of a client route reads DB_NAME_<CLIENT>.

**Usage:** `underpost site clone-route [options] <from-route> <to-route>`

### Arguments

| Argument | Description |
| --- | --- |
| `from-route` | Source route, <host>[/path]. |
| `to-route` | Target route, <host>[/path]. |

### Options

| Option | Description |
| --- | --- |
| `--deploy-id <deploy-id>` | Deployment the route is created in. |
| `--from-deploy-id <deploy-id>` | Deployment of the source route (default: --deploy-id). |
| `--client <client-id>` | Client the route serves instead of the source client. |
| `--replace` | Replaces a different entry at the target route. |
| `--dry-run` | Prints the change plan without writing it. |
| `-h, --help` | display help for command |

---

## underpost site add-api

Registers an existing API on every route that serves APIs (a non-empty apis list), in the development variants and replicas of the deployment.

**Usage:** `underpost site add-api [options] <api-id>`

### Arguments

| Argument | Description |
| --- | --- |
| `api-id` | Existing API (src/api/<api-id>). |

### Options

| Option | Description |
| --- | --- |
| `--deploy-id <deploy-id>` | Deployment. |
| `--client <client-id>` | Adds the API to the services of this client. |
| `--host <host>` | Registers the API only on the routes of this hostname. |
| `--dry-run` | Prints the change plan without writing it. |
| `-h, --help` | display help for command |

---

## underpost site add-component

Registers a client component in the component lists of the deployment and its replicas.

**Usage:** `underpost site add-component [options] <component-id>`

### Arguments

| Argument | Description |
| --- | --- |
| `component-id` | Component module name (src/client/components/<submodule>/<component-id>.js). |

### Options

| Option | Description |
| --- | --- |
| `--deploy-id <deploy-id>` | Deployment. |
| `--all-deploys` | Every deployment in the route table, instead of --deploy-id. |
| `--client <client-id>` | Limits the clients to one. |
| `--submodule <submodule-id>` | Limits the component lists to one submodule. |
| `--dry-run` | Prints the change plan without writing it. |
| `-h, --help` | display help for command |

---

## underpost client

Builds client assets, single replicas, and/or syncs environment ports.

**Usage:** `underpost client [options] [deploy-id] [sub-conf] [host] [path]`

### Arguments

| Argument | Description |
| --- | --- |
| `deploy-id` | The deployment ID to build. (default: "dd-default") |
| `sub-conf` | The sub-configuration for the build. (default: "") |
| `host` | Comma-separated hosts to filter the build. (default: "") |
| `path` | Comma-separated paths to filter the build. (default: "") |

### Options

| Option | Description |
| --- | --- |
| `--sync-env-port` | Sync environment port assignments across all deploy IDs |
| `--single-replica` | Build single replica folders instead of full client |
| `--build-zip` | Create zip files of the builds |
| `--split <mb>` | Split generated zip files into parts of the specified size in MB |
| `--unzip <build-prefix>` | Extract a built client zip or split zip parts using the given build prefix |
| `--merge-zip <build-prefix>` | Merge split ZIP parts back into a single ZIP file for the given build prefix |
| `--lite-build` | Skip full build (default is full build) |
| `--icons-build` | Build icons |
| `--ssr` | Rebuild only SSR views defined in conf.ssr.json, leaving client assets untouched |
| `--env <env>` | Target environment for the build (e.g. "production", "development"). Falls back to --dev, then NODE_ENV. |
| `--dev` | Sets the development cli context (shorthand for --env development). |
| `--docs <mode>` | TypeDoc site policy: auto (build in a full production build, keep the published site otherwise), skip, build, or watch (development preview of one client). (default: "auto") |
| `--docs-only` | Builds the documentation of the selected clients without their client assets. |
| `--build-id <build-id>` | Names the build in its logs and TypeDoc events (push-bundle sets it). |
| `-h, --help` | display help for command |

---

## underpost start

Initiates application servers, build pipelines, or other defined services based on the deployment ID.

**Usage:** `underpost start [options] <deploy-id> [env]`

### Arguments

| Argument | Description |
| --- | --- |
| `deploy-id` | The unique identifier for the deployment configuration. |
| `env` | Optional: The environment to start (e.g., "development", "production"). (default: "development") |

### Options

| Option | Description |
| --- | --- |
| `--run` | Starts application servers and monitors their health. |
| `--build` | Triggers the client-side application build process. |
| `--underpost-quickly-install` | Uses Underpost Quickly Install for dependency installation. |
| `--skip-pull-repo-base` | Skips cloning the engine source repository, uses current workspace code directly. |
| `--skip-pull-private-repo` | Skips cloning the private configuration repository, uses the engine-private already in the workspace. |
| `--skip-full-build` | Skips the full client bundle build during deployment. |
| `--pull-bundle` | Restores the client bundle the deployment conf names instead of building the client (run pull-bundle). |
| `--bundle <reference>` | Restores this exact client bundle instead of building the client: <release-id>/<build-id>@sha256:<digest>. |
| `--private-test-repo` | During --build, clone the private test source repo (engine-test-<id>) instead of the production engine-<id> repo. |
| `-h, --help` | display help for command |

---

## underpost clone

Clones a repository into a directory that does not exist or is empty.

**Usage:** `underpost clone [options] <repository> [destination]`

### Arguments

| Argument | Description |
| --- | --- |
| `repository` | The repository: "owner/repo" (GitHub over HTTPS), a clone URL or a path. |
| `destination` | The checkout directory; the repository name (<name>.git with --bare) by default. |

### Options

| Option | Description |
| --- | --- |
| `--branch <branch>` | Checks out this branch instead of the default one. |
| `--depth <depth>` | Clones a shallow history of this many commits. |
| `--sparse <directories>` | Checks out only these comma-separated directories. |
| `--bare` | Clones the git directory only. |
| `--replace` | Replaces an existing destination: the clone lands beside it and takes its place once it succeeded. |
| `-h, --help` | display help for command |

---

## underpost fetch

Updates the remote-tracking refs of a repository; the working tree and the branches stay.

**Usage:** `underpost fetch [options] [path]`

### Arguments

| Argument | Description |
| --- | --- |
| `path` | The repository directory. (default: ".") |

### Options

| Option | Description |
| --- | --- |
| `--remote <remote>` | The remote to fetch. (default: "origin") |
| `--branch <branch>` | Fetches only this branch. |
| `--prune` | Drops the tracking refs of the branches the remote no longer has. |
| `-h, --help` | display help for command |

---

## underpost pull

Fast-forwards the current branch to a remote branch. Never merges, rebases or replaces: a diverged history fails and nothing changes.

**Usage:** `underpost pull [options] [path] [repository]`

### Arguments

| Argument | Description |
| --- | --- |
| `path` | The repository directory. (default: ".") |
| `repository` | Pulls from this repository ("owner/repo" or a URL) instead of the tracked remote. |

### Options

| Option | Description |
| --- | --- |
| `--remote <remote>` | Pulls from this remote instead of the tracked one. |
| `--branch <branch>` | The remote branch; the tracked branch, else the current branch name, by default. |
| `-h, --help` | display help for command |

---

## underpost push

Publishes HEAD to a branch of a remote and logs the published commit.

**Usage:** `underpost push [options] [path] [repository]`

### Arguments

| Argument | Description |
| --- | --- |
| `path` | The repository directory. (default: ".") |
| `repository` | Pushes to this repository ("owner/repo" or a URL) instead of the tracked remote. |

### Options

| Option | Description |
| --- | --- |
| `--remote <remote>` | Pushes to this remote instead of the tracked one. |
| `--branch <branch>` | The remote branch; the current branch name by default. |
| `--force-with-lease` | Replaces the remote branch only while it holds what its remote-tracking ref last saw (a configured remote). |
| `-f, --force` | Replaces the remote branch whatever it holds, rewriting its history. |
| `--delete <branch>` | Deletes this branch of the remote, with its remote-tracking ref, instead of pushing. |
| `-h, --help` | display help for command |

---

## underpost sync

Replaces a managed checkout with the tip of a repository branch: origin is repointed, local commits of the branch, tracked changes and untracked files are discarded, ignored files stay. For deploy checkouts, never for working repositories.

**Usage:** `underpost sync [options] <path> <repository>`

### Arguments

| Argument | Description |
| --- | --- |
| `path` | The managed checkout; cloned when it holds none. |
| `repository` | The repository: "owner/repo" or a URL. |

### Options

| Option | Description |
| --- | --- |
| `--branch <branch>` | The branch to land on; the default branch of the repository by default. |
| `--dry-run` | Reports what the replacement would discard and changes nothing. |
| `-h, --help` | display help for command |

---

## underpost discard

Lists the staged, unstaged and untracked changes under each path, with its repository root, and with --force discards them.

**Usage:** `underpost discard [options] <paths...>`

### Arguments

| Argument | Description |
| --- | --- |
| `paths` | Repository roots, or directories inside one: only changes under them are discarded. |

### Options

| Option | Description |
| --- | --- |
| `--force` | Discards the listed changes; without it nothing changes. |
| `--ignored` | Discards ignored files too. |
| `-h, --help` | display help for command |

---

## underpost init

Initializes a repository, or keeps the one there, with the commit identity of GITHUB_USERNAME and GITHUB_EMAIL.

**Usage:** `underpost init [options] [path]`

### Arguments

| Argument | Description |
| --- | --- |
| `path` | The repository directory, created when missing. (default: ".") |

### Options

| Option | Description |
| --- | --- |
| `--origin <repository>` | Points origin at this repository ("owner/repo" or a URL). |
| `-h, --help` | display help for command |

---

## underpost status

Reads the state of a repository; nothing changes. One query per call; the short status without one.

**Usage:** `underpost status [options] [path]`

### Arguments

| Argument | Description |
| --- | --- |
| `path` | The repository directory. (default: ".") |

### Options

| Option | Description |
| --- | --- |
| `-b, --branch` | The current branch. |
| `--reflog [branch]` | The reflog of a branch, the current one by default. |
| `--contains <commit>` | The branches that contain a commit. |
| `--log [count]` | The latest commits with their files, and the command that shows their diffs. |
| `--unpushed` | With --log: the commits of HEAD no branch of origin holds, after fetching origin. |
| `--diff` | The word-diff command of the working tree changes. |
| `--staged` | With --diff: of the staged changes. |
| `--range <from[,to]>` | With --diff: between two commits, HEAD by default. |
| `--extension <extension>` | With --diff --range: only files with this extension. |
| `--message [nth]` | The message of the nth latest commit, the last by default. |
| `--remote-url` | The URL of origin, without credentials. |
| `--changes` | Prints "1" when the working tree has staged, unstaged or untracked changes, nothing otherwise. |
| `--reachable <repository>` | Whether a remote repository answers: true or false. |
| `--copy` | Copies the answer to the clipboard instead of printing it. |
| `-h, --help` | display help for command |

---

## underpost cmt

Commits the staged changes with a Conventional Commit message: type(scope): description.

**Usage:** `underpost cmt [options] [path] [type] [scope] [message]`

### Arguments

| Argument | Description |
| --- | --- |
| `path` | The repository directory. (default: ".") |
| `type` | The commit type: feat, fix, docs, style, refactor, perf, ci, cd, infra, build, test, chore, revert, backup, or a custom one with a message. (default: "feat") |
| `scope` | The scope of the commit. |
| `message` | The commit description; the default one of the type otherwise. |

### Options

| Option | Description |
| --- | --- |
| `--empty` | Commits with nothing staged. |
| `--amend` | Amends the last commit with the staged changes, keeping its message. |
| `--copy` | Copies the message to the clipboard instead of committing. |
| `--types` | Lists the commit types. |
| `--undo [count]` | Undoes the last commits, 1 by default, keeping their changes staged; --copy copies the last message. |
| `-h, --help` | display help for command |

---

## underpost merge-dependabot

Fetches origin and merges each origin/dependabot/* branch into the base branch, one at a time, and prints ok or failed for each. Local changes are stashed and come back, with the branch you were on; nothing is pushed.

**Usage:** `underpost merge-dependabot [options] [path]`

### Arguments

| Argument | Description |
| --- | --- |
| `path` | The repository, or a directory inside it. (default: ".") |

### Options

| Option | Description |
| --- | --- |
| `--base <branch>` | The branch to merge into; the default branch of origin by default. |
| `-h, --help` | display help for command |

---

## underpost github

GitHub automation: workflows and repository metadata.

**Usage:** `underpost github [options] [command]`

### Options

| Option | Description |
| --- | --- |
| `-h, --help` | display help for command |

### Commands

| Command | Description |
| --- | --- |
| `dispatch [options] <repository> <workflow>` | Dispatches a workflow_dispatch workflow and prints the run GitHub created. Accepted is not completed: follow the run. |
| `repo [repository]` | Prints the metadata of a repository: default branch, visibility and the permissions of the credential. |
| `help [command]` | display help for command |

---

## underpost github dispatch

Dispatches a workflow_dispatch workflow and prints the run GitHub created. Accepted is not completed: follow the run.

**Usage:** `underpost github dispatch [options] <repository> <workflow>`

### Arguments

| Argument | Description |
| --- | --- |
| `repository` | The repository: "owner/repo" or a GitHub URL. |
| `workflow` | The workflow file name or id. |

### Options

| Option | Description |
| --- | --- |
| `--ref <ref>` | The ref the workflow runs on; the default branch by default. |
| `--input <key=value>` | A workflow input; repeat for each. |
| `-h, --help` | display help for command |

---

## underpost github repo

Prints the metadata of a repository: default branch, visibility and the permissions of the credential.

**Usage:** `underpost github repo [options] [repository]`

### Arguments

| Argument | Description |
| --- | --- |
| `repository` | The repository: "owner/repo" or a GitHub URL; the origin of the working directory by default. |

### Options

| Option | Description |
| --- | --- |
| `-h, --help` | display help for command |

---

## underpost static

Manages static build of page, bundles, and documentation with comprehensive customization options.

**Usage:** `underpost static [options]`

### Options

| Option | Description |
| --- | --- |
| `--page <ssr-component-path>` | Build custom static pages. |
| `--title <title>` | Sets a custom title for the static page (deprecated: use --config-file). |
| `--output-path <output-path>` | Sets the output path for the generated static page. |
| `--description <description>` | Page description for SEO. |
| `--keywords <keywords>` | Comma-separated keywords for SEO. |
| `--author <author>` | Page author. |
| `--theme-color <color>` | Theme color for mobile browsers. |
| `--canonical-url <url>` | Canonical URL for SEO. |
| `--thumbnail <url>` | Open Graph thumbnail image URL. |
| `--locale <locale>` | Page locale (default: en-US). |
| `--site-name <name>` | Site name for Open Graph. |
| `--head-scripts <paths>` | Comma-separated paths to scripts for head section. |
| `--body-scripts <paths>` | Comma-separated paths to scripts for body section. |
| `--styles <paths>` | Comma-separated paths to stylesheets. |
| `--favicon <path>` | Favicon path. |
| `--apple-touch-icon <path>` | Apple touch icon path. |
| `--manifest <path>` | Web manifest path. |
| `--head-components <paths>` | Comma-separated SSR head component paths. |
| `--body-components <paths>` | Comma-separated SSR body component paths. |
| `--build-path <build-path>` | Sets a custom build path for static documents or assets. |
| `--site-root <dir>` | Sets the directory the site serves at the build path, where the build writes the underpost.manifest the page links (default: the output directory). |
| `--application <name>` | Sets the application the build manifest names (default: the page component name). Pages of one site share it. |
| `--env <env>` | Sets the environment for the static build (e.g., "development", "production"). |
| `--minify` | Minify HTML output (default: true for production). |
| `--no-minify` | Disable HTML minification. |
| `--config-file <path>` | Path to JSON configuration file. |
| `--generate-config [path]` | Generate a template configuration file. |
| `--lang <lang>` | HTML lang attribute (default: en). |
| `--dir <dir>` | HTML dir attribute (default: ltr). |
| `--dev` | Sets the development cli context |
| `--run-sv [port]` | Start a standalone Express static server to preview the static build (default port: 5000). |
| `-h, --help` | display help for command |

---

## underpost root

Displays the root path of the npm installation.

**Usage:** `underpost root [options]`

### Options

| Option | Description |
| --- | --- |
| `-h, --help` | display help for command |

---

## underpost ip

Displays the current public machine IP addresses.

**Usage:** `underpost ip [options] [ips]`

### Arguments

| Argument | Description |
| --- | --- |
| `ips` | Optional args comma-separated list of IP to process. |

### Options

| Option | Description |
| --- | --- |
| `--dhcp` | Fetches and displays the current Dynamic Host Configuration Protocol server IP address. |
| `--copy` | Copies the IP addresses to the clipboard. |
| `--ban-ingress-add` | Adds IP addresses to banned ingress list. |
| `--ban-ingress-remove` | Removes IP addresses from banned ingress list. |
| `--ban-ingress-list` | Lists all banned ingress IP addresses. |
| `--ban-ingress-clear` | Clears all banned ingress IP addresses. |
| `--ban-egress-add` | Adds IP addresses to banned egress list. |
| `--ban-egress-remove` | Removes IP addresses from banned egress list. |
| `--ban-egress-list` | Lists all banned egress IP addresses. |
| `--ban-egress-clear` | Clears all banned egress IP addresses. |
| `--ban-both-add` | Adds IP addresses to both banned ingress and egress lists. |
| `--ban-both-remove` | Removes IP addresses from both banned ingress and egress lists. |
| `--block-all-egress` | Blocks all outbound traffic from this host (keeps established/related connections). |
| `--unblock-all-egress` | Unblocks all outbound traffic and restores default ACCEPT policy. |
| `--block-all-ingress` | Blocks all new inbound traffic to this host (keeps established/related connections). |
| `--unblock-all-ingress` | Unblocks all inbound traffic and restores default ACCEPT policy. |
| `--block-ingress-port <ports>` | Blocks new inbound traffic on comma-separated TCP ports, leaving the management path reachable. |
| `--unblock-ingress-port <ports>` | Withdraws the port rules --block-ingress-port installed. |
| `--mac` | Prints the MAC address of the main network interface. |
| `--static-ipv4` | Pins the default interface's current IPv4 address, gateway and DNS as a static NetworkManager profile. A timer restores the previous profile after 5 minutes unless the new binding is verified. |
| `--dry-run` | With --static-ipv4, prints the commands without applying them. |
| `-h, --help` | display help for command |

---

## underpost cluster

Manages Kubernetes clusters, defaulting to Kind cluster initialization.

**Usage:** `underpost cluster [options] [pod-name]`

### Arguments

| Argument | Description |
| --- | --- |
| `pod-name` | Optional: Filters information by a specific pod name. |

### Options

| Option | Description |
| --- | --- |
| `--namespace-workloads <namespace>` | The namespace of the application workloads; overrides --namespace and conf.cluster.json. |
| `--namespace-releases <namespace>` | The namespace of the release Jobs; overrides conf.cluster.json. |
| `--namespace-platform <namespace>` | The namespace of the Underpost gateway and ingress; overrides conf.cluster.json. |
| `--namespace-operations <namespace>` | The namespace of the operational CronJobs; overrides conf.cluster.json. |
| `--namespace-observability <namespace>` | The namespace of the monitoring stack; overrides conf.cluster.json. |
| `--namespace-mongodb <namespace>` | The namespace of MongoDB; overrides conf.cluster.json. |
| `--namespace-mariadb <namespace>` | The namespace of MariaDB; overrides conf.cluster.json. |
| `--namespace-mysql <namespace>` | The namespace of MySQL; overrides conf.cluster.json. |
| `--namespace-postgresql <namespace>` | The namespace of PostgreSQL; overrides conf.cluster.json. |
| `--namespace-valkey <namespace>` | The namespace of Valkey; overrides conf.cluster.json. |
| `--namespace-ipfs <namespace>` | The namespace of IPFS Cluster; overrides conf.cluster.json. |
| `--namespace-envoy-gateway <namespace>` | The namespace of Envoy Gateway; overrides conf.cluster.json. |
| `--namespace-cert-manager <namespace>` | The namespace of cert-manager; overrides conf.cluster.json. |
| `--reset` | Deletes all clusters and prunes all related data and caches. |
| `--reset-mongodb` | Performs a hard cleanup of only MongoDB-related resources (StatefulSet, PVCs/PVs, Secrets, ConfigMaps, caches) without restarting the whole node. Combined with --mongodb it instead wipes the retained hostPath volumes as part of that deploy, so the replica set starts from empty data. |
| `--mariadb` | Initializes the cluster with a MariaDB statefulset. |
| `--mysql` | Initializes the cluster with a MySQL statefulset. |
| `--mongodb` | Initializes the cluster with a MongoDB statefulset. |
| `--service-host <host>` | Set custom host/IP for exposed MongoDB and Valkey clients. |
| `--postgresql` | Initializes the cluster with a PostgreSQL statefulset. |
| `--kafka` | Initializes the cluster with the basic Kafka KRaft statefulset in the kafka namespace. |
| `--mongodb4` | Initializes the cluster with a MongoDB 4.4 service. |
| `--mongo-express` | Deploys the mongo-express web client for inspecting the MongoDB statefulset databases and collections. Reuses the mongodb-secret credentials, and drops them when the deployed mongod runs without --auth. Combine with --node-port to expose it on the node network. |
| `--valkey` | Initializes the cluster with a Valkey service. |
| `--ipfs` | Initializes the cluster with an ipfs-cluster statefulset. |
| `--contour` | Initializes the cluster with Project Contour base HTTPProxy and Envoy. |
| `--gateway-api` | Initializes the cluster with the Gateway API control plane (CRDs, Envoy Gateway, GatewayClass) used by generated HTTPRoute + QUIC/HTTP3 manifests. With --dev the data plane binds the listener ports on the host network for direct browser access. |
| `--gateway-class <name>` | GatewayClass name to provision (default "eg"). |
| `--ingress-node <node-name>` | Dedicated node for underpost-ingress when both routing stacks coexist. Workload placement flags do not move it. |
| `--node-port` | Exposes enabled ready services (e.g. MongoDB 4.4, Valkey) to the host/public network via their NodePort Service manifest. |
| `--node-name <k8s-node-name>` | The Kubernetes node of every resource this run installs; overrides the scheduling of conf.cluster.json. |
| `--cert-manager` | Installs cert-manager and reconciles the Let's Encrypt ClusterIssuer (node bin tls issuer reconcile). |
| `--dedicated-gpu` | Initializes the cluster with dedicated GPU base resources and environment settings. |
| `--kubeadm` | Initializes the cluster using kubeadm for control plane management. |
| `--pod-network-cidr <cidr>` | Sets custom pod network CIDR for kubeadm cluster initialization (defaults to "192.168.0.0/16"). |
| `--control-plane-endpoint <endpoint>` | Sets custom control plane endpoint for kubeadm cluster initialization (defaults to "localhost:6443"). |
| `--grafana` | Initializes the cluster with the observability stack (Prometheus, Alertmanager, Blackbox Exporter, Grafana). Equivalent to --prom; both converge the one stack. |
| `--prom [hosts]` | Initializes the cluster with the observability stack. Scrape targets are derived from each deploy conf.server.json; the optional comma-separated hosts are scraped at /metrics in addition to them. |
| `--dev` | Initializes a development-specific cluster configuration. |
| `--list-pods` | Displays detailed information about all pods. |
| `--pull-image` | Sets an optional associated image to pull during initialization. |
| `--init-host` | Installs the host tools of the cluster runtime named by --kubeadm or --k3s, or of every runtime (docker, podman, cri-o, kind, kubeadm, helm). |
| `--uninstall-host` | Uninstalls all host components installed by init-host. |
| `--config` | Sets the base Kubernetes node configuration. |
| `--chown` | Sets the appropriate ownership for Kubernetes kubeconfig files. |
| `--k3s` | Initializes the cluster using K3s (Lightweight Kubernetes). |
| `--hosts <hosts>` | A comma-separated list of cluster hostnames or IP addresses. |
| `--remove-volume-host-paths` | Removes specified volume host paths after execution. |
| `--reset-mode <mode>` | Reset mode for --reset --k3s: "drain" (stop services, keep K3s installed) or "full" (uninstall + cleanup). Default: "full". |
| `--namespace <namespace>` | The namespace of the workloads; without it, engine-private/deploy/conf.cluster.json places them. Each other resource takes its --namespace-<resource> option. |
| `--replicas <replicas>` | Sets a custom number of replicas for statefulset deployments. |
| `-h, --help` | display help for command |

---

## underpost deploy

Manages application deployments, defaulting to deploying development pods.

**Usage:** `underpost deploy [options] [deploy-list] [env]`

### Arguments

| Argument | Description |
| --- | --- |
| `deploy-list` | A comma-separated list of deployment IDs (e.g., "default-a,default-b"). |
| `env` | Optional: The environment for deployment (e.g., "development", "production"). (default: "development") |

### Options

| Option | Description |
| --- | --- |
| `--namespace-workloads <namespace>` | The namespace of the application workloads; overrides --namespace and conf.cluster.json. |
| `--namespace-releases <namespace>` | The namespace of the release Jobs; overrides conf.cluster.json. |
| `--namespace-platform <namespace>` | The namespace of the Underpost gateway and ingress; overrides conf.cluster.json. |
| `--namespace-operations <namespace>` | The namespace of the operational CronJobs; overrides conf.cluster.json. |
| `--namespace-observability <namespace>` | The namespace of the monitoring stack; overrides conf.cluster.json. |
| `--namespace-mongodb <namespace>` | The namespace of MongoDB; overrides conf.cluster.json. |
| `--namespace-mariadb <namespace>` | The namespace of MariaDB; overrides conf.cluster.json. |
| `--namespace-mysql <namespace>` | The namespace of MySQL; overrides conf.cluster.json. |
| `--namespace-postgresql <namespace>` | The namespace of PostgreSQL; overrides conf.cluster.json. |
| `--namespace-valkey <namespace>` | The namespace of Valkey; overrides conf.cluster.json. |
| `--namespace-ipfs <namespace>` | The namespace of IPFS Cluster; overrides conf.cluster.json. |
| `--namespace-envoy-gateway <namespace>` | The namespace of Envoy Gateway; overrides conf.cluster.json. |
| `--namespace-cert-manager <namespace>` | The namespace of cert-manager; overrides conf.cluster.json. |
| `--remove` | Deletes specified deployments and their associated services. |
| `--sync` | Synchronizes deployment environment variables, ports, and replica counts. |
| `--info-router` | Displays the current router structure and configuration. |
| `--node <node>` | Sets optional node for deployment operations. |
| `--ingress-node <node-name>` | Explicitly relocates the shared host-network ingress; ordinary --node placement never moves it. |
| `--ssh-key-path <path>` | Private key path for node SSH operations. Currently used when shipping a hostPath volume to a remote target node over SSH. Defaults to engine-private/deploy/id_rsa. |
| `--build-manifest` | Builds Kubernetes YAML manifests: deployments, services, volumes, Gateways, routes and proxies. |
| `--sync-static` | Places the SSR status pages and intercepted contexts in the gateway static utility tree, so the edge serves them instead of the application pods. Prefers the running workload of the serving colour (or of --versions) and falls back to this checkout, so it can seed the tree before the deployment exists and refresh it once the deployment is Ready. Every traffic switch runs it from the colour it routes to. |
| `--replicas <replicas>` | Sets a custom number of replicas for deployments. |
| `--image <image>` | Sets a custom image for deployments. |
| `--versions <deployment-versions>` | A comma-separated list of custom deployment versions. |
| `--traffic <traffic-versions>` | A comma-separated list of custom deployment traffic weights. |
| `--timeout-response <duration>` | Sets HTTPProxy per-route response timeout (e.g., "1s", "300ms", "infinity"). |
| `--timeout-idle <duration>` | Sets HTTPProxy per-route idle timeout (e.g., "10s", "infinity"). |
| `--retry-count <count>` | Sets HTTPProxy per-route retry count (e.g., 3). |
| `--retry-per-try-timeout <duration>` | Sets HTTPProxy retry per-try timeout (e.g., "150ms"). |
| `--disable-update-deployment` | Disables updates to deployments. |
| `--disable-runtime-probes` | Deprecated compatibility flag; readiness probes remain mandatory. Use --tcp-probes for legacy workloads. |
| `--tcp-probes` | Generates legacy TCP socket probes instead of HTTP internal-status probes (migration). |
| `--disable-update-proxy` | Disables updates to proxies. |
| `--disable-deployment-proxy` | Disables proxies of deployments. |
| `--gateway-class <name>` | GatewayClass name for generated Gateway manifests (default "eg"). |
| `--disable-http3` | Omits the QUIC/HTTP3 listener config and the Alt-Svc advertisement from Gateway API manifests. |
| `--quic-port <port>` | UDP port advertised for QUIC/HTTP3 in generated Gateway API manifests (default 443). |
| `--disable-update-volume` | Disables updates to volume mounts during deployment. |
| `--kubeadm` | Enables the kubeadm context for deployment operations. |
| `--k3s` | Enables the k3s context for deployment operations. |
| `--kind` | Enables the kind context for deployment operations. |
| `--git-clean` | Runs git clean on volume mount paths before copying. |
| `--disable-update-underpost-config` | Disables updates to Underpost configuration during deployment. |
| `--namespace <namespace>` | The namespace of the application workloads; without it, engine-private/deploy/conf.cluster.json places them. |
| `--cmd <cmd>` | Custom initialization command for deployment (comma-separated commands). |
| `--skip-full-build` | Skip client bundle rebuild; container will pull pre-built bundle via pull-bundle instead. |
| `--pull-bundle` | Explicitly pull the pre-built client bundle from Cloudinary inside the container. Use together with --skip-full-build. |
| `--image-pull-policy <policy>` | Override container imagePullPolicy in the generated deployment manifest (Always, IfNotPresent, Never). Defaults to Never for localhost/ images and IfNotPresent otherwise. |
| `-h, --help` | display help for command |

---

## underpost secret

Workload secret store: SOPS/Age encrypted credentials projected as Kubernetes Secrets.

**Usage:** `underpost secret [options] <action>`

### Arguments

| Argument | Description |
| --- | --- |
| `action` | Action to run. One of: setup, load, publish, apply, status, rotate, clean. setup Onboards the domain: provisions whatever it needs, then converges it. Idempotent. load Loads the durable source into the local runtime environment. publish Writes the local runtime environment into the durable source. apply Projects the durable source into the live cluster. status Read-only report of the domain: sources, keys, and drift from the cluster. rotate Replaces the current projection or encryption identity. clean Withdraws the domain traces from the local filesystem. |

### Options

| Option | Description |
| --- | --- |
| `--env <env>` | Target environment: development \| production \| test (default: production). |
| `--namespace <namespace>` | The namespace of the workloads; without it, conf.cluster.json places them. |
| `--args <key=value-list>` | Comma-separated domain parameters; a list separates its entries with `\|`, e.g. `names=mongodb/credentials\|mongodb/keyfile`, `recipient=age1...`, `sub-conf=nexodev`. |
| `--dry-run` | Reports what the action would change without changing anything. |
| `--force` | Confirms the irreversible variant of the action. For app apply: projects an environment whose endpoint its consumers do not reach. |
| `-h, --help` | display help for command |

---

## underpost host

Host configuration: the node-level operational environment shared by the cluster.

**Usage:** `underpost host [options] <action> [key] [value]`

### Arguments

| Argument | Description |
| --- | --- |
| `action` | Action to run. One of: setup, load, publish, apply, status, rotate, clean, get, set, delete, list. setup Onboards the domain: provisions whatever it needs, then converges it. Idempotent. load Loads the durable source into the local runtime environment. publish Writes the local runtime environment into the durable source. apply Projects the durable source into the live cluster. status Read-only report of the domain: sources, keys, and drift from the cluster. rotate Replaces the current projection or encryption identity. clean Withdraws the domain traces from the local filesystem. get\|set\|delete\|list Key-level access to the store this domain owns. |
| `key` | Key to act on, for the key-level operators. |
| `value` | Value to write, for the `set` operator. |

### Options

| Option | Description |
| --- | --- |
| `--env <env>` | Target environment: development \| production \| test (default: production). |
| `--namespace <namespace>` | The namespace of the workloads; without it, conf.cluster.json places them. |
| `--args <key=value-list>` | Comma-separated domain parameters; a list separates its entries with `\|`, e.g. `names=mongodb/credentials\|mongodb/keyfile`, `recipient=age1...`, `sub-conf=nexodev`. |
| `--dry-run` | Reports what the action would change without changing anything. |
| `--force` | Confirms the irreversible variant of the action. For app apply: projects an environment whose endpoint its consumers do not reach. |
| `--plain` | Prints the value in plain text (get). |
| `--filter <keyword>` | Filters by matching key or value (list). |
| `--copy` | Copies the value to the clipboard (get). |
| `-h, --help` | display help for command |

---

## underpost app

Application environment: one deployment's runtime configuration.

**Usage:** `underpost app [options] <action>`

### Arguments

| Argument | Description |
| --- | --- |
| `action` | Action to run. One of: setup, load, publish, apply, status, rotate, clean. setup Onboards the domain: provisions whatever it needs, then converges it. Idempotent. load Loads the durable source into the local runtime environment. publish Writes the local runtime environment into the durable source. apply Projects the durable source into the live cluster. status Read-only report of the domain: sources, keys, and drift from the cluster. rotate Replaces the current projection or encryption identity. clean Withdraws the domain traces from the local filesystem. |

### Options

| Option | Description |
| --- | --- |
| `--env <env>` | Target environment: development \| production \| test (default: production). |
| `--namespace <namespace>` | The namespace of the workloads; without it, conf.cluster.json places them. |
| `--args <key=value-list>` | Comma-separated domain parameters; a list separates its entries with `\|`, e.g. `names=mongodb/credentials\|mongodb/keyfile`, `recipient=age1...`, `sub-conf=nexodev`. |
| `--dry-run` | Reports what the action would change without changing anything. |
| `--force` | Confirms the irreversible variant of the action. For app apply: projects an environment whose endpoint its consumers do not reach. |
| `-h, --help` | display help for command |

---

## underpost state

Runtime state: live container execution state, health and metrics, exported off-cluster.

**Usage:** `underpost state [options] <action> [key] [value]`

### Arguments

| Argument | Description |
| --- | --- |
| `action` | Action to run. One of: setup, load, publish, apply, status, rotate, clean, get, set, delete, list. setup Onboards the domain: provisions whatever it needs, then converges it. Idempotent. load Loads the durable source into the local runtime environment. publish Writes the local runtime environment into the durable source. apply Projects the durable source into the live cluster. status Read-only report of the domain: sources, keys, and drift from the cluster. rotate Replaces the current projection or encryption identity. clean Withdraws the domain traces from the local filesystem. get\|set\|delete\|list Key-level access to the store this domain owns. |
| `key` | Key to act on, for the key-level operators. |
| `value` | Value to write, for the `set` operator. |

### Options

| Option | Description |
| --- | --- |
| `--env <env>` | Target environment: development \| production \| test (default: production). |
| `--namespace <namespace>` | The namespace of the workloads; without it, conf.cluster.json places them. |
| `--args <key=value-list>` | Comma-separated domain parameters; a list separates its entries with `\|`, e.g. `names=mongodb/credentials\|mongodb/keyfile`, `recipient=age1...`, `sub-conf=nexodev`. |
| `--dry-run` | Reports what the action would change without changing anything. |
| `--force` | Confirms the irreversible variant of the action. For app apply: projects an environment whose endpoint its consumers do not reach. |
| `--plain` | Prints the value in plain text (get). |
| `--filter <keyword>` | Filters by matching key or value (list). |
| `--copy` | Copies the value to the clipboard (get). |
| `-h, --help` | display help for command |

---

## underpost image

Manages Docker images, including building, saving, and loading into Kubernetes clusters.

**Usage:** `underpost image [options]`

### Options

| Option | Description |
| --- | --- |
| `--build` | Builds a Docker image using Podman, optionally saves it as a tar archive, and loads it into a specified Kubernetes cluster (Kind, Kubeadm, or K3s). |
| `--ls` | Lists all available Underpost Dockerfile images. |
| `--rm <image-id>` | Removes specified Underpost Dockerfile images. |
| `--path [path]` | The path to the Dockerfile directory. |
| `--image-name [image-name]` | Sets a custom name for the Docker image. |
| `--image-out-path [image-out-path]` | Sets the output path for the tar image archive. |
| `--dockerfile-name [dockerfile-name]` | Sets a custom name for the Dockerfile. |
| `--podman-save` | Exports the built image as a tar file using Podman. |
| `--pull-base` | Pulls the base image prerequisites (rockylinux:9) on the host; combine with --build. |
| `--spec` | Get current cached list of container images used by all pods |
| `--namespace <namespace>` | Kubernetes namespace for image operations (defaults to "default"). |
| `--kind` | Set kind cluster env image context management. |
| `--kubeadm` | Set kubeadm cluster env image context management. |
| `--k3s` | Set k3s cluster env image context management. |
| `--docker-compose` | Load the built image tar into the local Docker store for Docker Compose availability. |
| `--nodes <node-names>` | Comma-separated Kubernetes nodes that --ls, --rm, --pull-dockerhub, --digest, --release and --import-tar act on, reached through their node identity in engine-private/deploy/nodes. Empty acts on this host, or on kind-worker with --kind. |
| `--ssh-key-path <path>` | Replaces the registered SSH key of each --nodes peer. |
| `--reset` | Performs a build without using the cache. |
| `--dev` | Use development mode. |
| `--pull-dockerhub <dockerhub-image>` | Sets a custom Docker Hub image for base image pulls. |
| `--release` | Container release: print the digest of the image for --revision, pulled from CI (latest) or, with --path, built here, on each --nodes runtime. |
| `--revision <sha>` | With --release: the exact source revision. |
| `--digest <reference>` | Pulls an image reference on each node runtime and prints the digest they share. |
| `--import-tar <tar-path>` | Load a pre-built image tar archive (e.g. ./image-v1.0.0.tar) into the enabled target(s) without building. Combine with --kind, --kubeadm, --k3s and/or --docker-compose; the archive is loaded into each enabled one. |
| `-h, --help` | display help for command |

---

## underpost install

Quickly imports Underpost npm dependencies by copying them.

**Usage:** `underpost install [options]`

### Options

| Option | Description |
| --- | --- |
| `-h, --help` | display help for command |

---

## underpost db

Manages MariaDB and MongoDB databases: sealed backups in the object store, restores, verification and restore drills, retention, statistics, and collection operations.

**Usage:** `underpost db [options] [command] [deploy-list]`

### Arguments

| Argument | Description |
| --- | --- |
| `deploy-list` | A comma-separated list of deployment IDs (e.g., "default-a,default-b"). |

### Options

| Option | Description |
| --- | --- |
| `--namespace-workloads <namespace>` | The namespace of the application workloads; overrides --namespace and conf.cluster.json. |
| `--namespace-releases <namespace>` | The namespace of the release Jobs; overrides conf.cluster.json. |
| `--namespace-platform <namespace>` | The namespace of the Underpost gateway and ingress; overrides conf.cluster.json. |
| `--namespace-operations <namespace>` | The namespace of the operational CronJobs; overrides conf.cluster.json. |
| `--namespace-observability <namespace>` | The namespace of the monitoring stack; overrides conf.cluster.json. |
| `--namespace-mongodb <namespace>` | The namespace of MongoDB; overrides conf.cluster.json. |
| `--namespace-mariadb <namespace>` | The namespace of MariaDB; overrides conf.cluster.json. |
| `--namespace-mysql <namespace>` | The namespace of MySQL; overrides conf.cluster.json. |
| `--namespace-postgresql <namespace>` | The namespace of PostgreSQL; overrides conf.cluster.json. |
| `--namespace-valkey <namespace>` | The namespace of Valkey; overrides conf.cluster.json. |
| `--namespace-ipfs <namespace>` | The namespace of IPFS Cluster; overrides conf.cluster.json. |
| `--namespace-envoy-gateway <namespace>` | The namespace of Envoy Gateway; overrides conf.cluster.json. |
| `--namespace-cert-manager <namespace>` | The namespace of cert-manager; overrides conf.cluster.json. |
| `--export` | Backs up every database of each deployment to the object store. |
| `--import` | Restores a backup of each deployment (default: the newest available one). |
| `--backup <backup-id>` | Selects the backup that --import, --verify or --inspect reads. |
| `--list` | Lists the backups of each deployment, newest first, with the UTC time each one started. |
| `--inspect` | Prints one backup from its manifest, without reading its data: when it was taken, its last verification, and each stream with the collections, documents and indexes it holds. Reads --backup, or the newest available backup; --hosts and --paths keep the streams of those databases. |
| `--rename-database <from:to>` | With --import or --inspect, restores each database whose name is <from>, or starts with <from>-, under <to>: example-cyberia:cyberia restores example-cyberia-content as cyberia-content. A renamed collection gets a new UUID. Comma-separated pairs. |
| `--verify` | Reads every part of a backup and checks its checksums, seal and archive inventory. |
| `--restore-test` | With --verify, restores the backup into an isolated mongod and compares it with its manifest. |
| `--prune` | Removes the backups that the retention policy no longer keeps. |
| `--keep <n>` | With --prune, the number of available backups to keep, newest first. |
| `--dry-run` | With --prune, reports what it would remove and removes nothing. |
| `--trees` | With --import, also restores the site file trees of the backup. |
| `--pod-name <pod-name>` | Comma-separated list of pod names or patterns (supports wildcards like "mariadb-*"). |
| `--all-pods` | With --stats, reads every matching pod instead of one. |
| `--primary-pod` | Reads dumps from the MongoDB primary instead of a secondary. |
| `--stats` | Display database statistics (collection/table names with document/row counts). |
| `--collections <collections>` | Comma-separated list of database collections to operate on. |
| `--out-path <out-path>` | Writes or reads plain archives in this local directory instead of the object store. |
| `--drop` | Drops each collection before restoring it. |
| `--preserveUUID` | Preserves collection UUIDs on restore (requires --drop). |
| `--hosts <hosts>` | Comma-separated list of database hosts to filter operations. |
| `--paths <paths>` | Comma-separated list of paths to filter database operations. |
| `--namespace <namespace>` | The namespace of the workloads; without it, engine-private/deploy/conf.cluster.json places them. Each database takes its --namespace-<resource> option. |
| `--clean-fs-collection` | Cleans orphaned File documents from collections that are not referenced by any models. |
| `--clean-fs-dry-run` | Dry run mode - shows what would be deleted without actually deleting (use with --clean-fs-collection). |
| `--migrate-stable-slugs` | Assigns every Document its public URL slug (stableSlug) and builds the unique index; idempotent, one-shot. |
| `--dev` | Uses the development sandbox of this host (underpost sandbox up): its cluster, its MongoDB through the sandbox forward, and the development env. Refused when no sandbox runs. |
| `--kubeadm` | Enables the kubeadm context for database operations. |
| `--kind` | Enables the kind context for database operations. |
| `--k3s` | Enables the k3s context for database operations. |
| `-h, --help` | display help for command |

### Commands

| Command | Description |
| --- | --- |
| `collection` | Inspects, clones, moves and renames one application collection with the File documents it references. Each command prints its plan; --apply writes. Credentials never appear in the output. Outside a container the command reaches the MongoDB primary through a port-forward; with --dev, the MongoDB of the development sandbox. |

---

## underpost db collection

Inspects, clones, moves and renames one application collection with the File documents it references. Each command prints its plan; --apply writes. Credentials never appear in the output. Outside a container the command reaches the MongoDB primary through a port-forward; with --dev, the MongoDB of the development sandbox.

**Usage:** `underpost db collection [options] [command]`

### Options

| Option | Description |
| --- | --- |
| `-h, --help` | display help for command |

### Commands

| Command | Description |
| --- | --- |
| `inspect [options] <collection>` | Reports a collection: documents, indexes, File references, missing Files and relationships. With --target-host, also reports the target. Reads only. |
| `clone [options] <collection>` | Copies a collection to a target with its _id values, indexes and referenced File documents, then verifies the target. The source stays unchanged. An interrupted clone resumes when the same command runs again. |
| `move [options] <collection>` | Moves a collection: clones and verifies it, then deletes the source only with --confirm-source-delete. |
| `rename [options] <collection>` | Renames a collection inside its database. Documents, ids and indexes stay; an existing target name is refused. Update the model or its configuration to read the new name. |
| `help [command]` | display help for command |

---

## underpost metadata

Manages cluster metadata operations, including import and export.

**Usage:** `underpost metadata [options] [deploy-id] [host] [path]`

### Arguments

| Argument | Description |
| --- | --- |
| `deploy-id` | The deployment ID to manage metadata. |
| `host` | The host to manage metadata. |
| `path` | The path to manage metadata. |

### Options

| Option | Description |
| --- | --- |
| `--import` | Imports from local storage. |
| `--export` | Exports to local storage. |
| `--crons` | Apply to cron data collection |
| `--instances` | Apply to instance data collection |
| `--generate` | Generate cluster metadata |
| `--itc` | Apply under container execution context |
| `--dev` | Uses the development sandbox of this host (underpost sandbox up): its cluster, its MongoDB through the sandbox forward, and the development env. Refused when no sandbox runs. |
| `-h, --help` | display help for command |

---

## underpost cron

Manages cron jobs: execute jobs directly or generate and apply K8s CronJob manifests.

**Usage:** `underpost cron [options] [deploy-list] [job-list]`

### Arguments

| Argument | Description |
| --- | --- |
| `deploy-list` | A comma-separated list of deployment IDs (e.g., "default-a,default-b"). In manifest modes its first entry is the manifest owner deploy-id. |
| `job-list` | A comma-separated list of job IDs. Options: dns,backup,vultr. Defaults to all available jobs, and restricts which jobs are generated in manifest modes. |

### Options

| Option | Description |
| --- | --- |
| `--namespace-workloads <namespace>` | The namespace of the application workloads; overrides --namespace and conf.cluster.json. |
| `--namespace-releases <namespace>` | The namespace of the release Jobs; overrides conf.cluster.json. |
| `--namespace-platform <namespace>` | The namespace of the Underpost gateway and ingress; overrides conf.cluster.json. |
| `--namespace-operations <namespace>` | The namespace of the operational CronJobs; overrides conf.cluster.json. |
| `--namespace-observability <namespace>` | The namespace of the monitoring stack; overrides conf.cluster.json. |
| `--namespace-mongodb <namespace>` | The namespace of MongoDB; overrides conf.cluster.json. |
| `--namespace-mariadb <namespace>` | The namespace of MariaDB; overrides conf.cluster.json. |
| `--namespace-mysql <namespace>` | The namespace of MySQL; overrides conf.cluster.json. |
| `--namespace-postgresql <namespace>` | The namespace of PostgreSQL; overrides conf.cluster.json. |
| `--namespace-valkey <namespace>` | The namespace of Valkey; overrides conf.cluster.json. |
| `--namespace-ipfs <namespace>` | The namespace of IPFS Cluster; overrides conf.cluster.json. |
| `--namespace-envoy-gateway <namespace>` | The namespace of Envoy Gateway; overrides conf.cluster.json. |
| `--namespace-cert-manager <namespace>` | The namespace of cert-manager; overrides conf.cluster.json. |
| `--generate-k8s-cronjobs` | Generates Kubernetes CronJob YAML manifests from cron configuration. |
| `--apply` | Generates and applies K8s CronJob manifests to the cluster via kubectl (never runs jobs). |
| `--setup-start` | Updates deploy-list package.json start script and generates+applies its K8s CronJob manifests. |
| `--namespace <namespace>` | The namespace of the CronJobs; the operations namespace of conf.cluster.json by default. A copy stays suspended while another namespace runs its schedule. |
| `--image <image>` | Custom container image for the CronJob pods. |
| `--node-name <node-name>` | Pins the CronJob pods to this node via a kubernetes.io/hostname nodeSelector. With --apply, defaults to this machine when the cluster knows it as a node, because the pods mount its checkout. |
| `--cmd <cmd>` | Optional pre-script commands to run before cron execution. |
| `--dev` | Use local ./ base path instead of global underpost installation. |
| `--k3s` | Use k3s cluster context (apply directly on host). |
| `--kind` | Use kind cluster context (apply via kind-worker container). |
| `--kubeadm` | Use kubeadm cluster context (apply directly on host). |
| `--dry-run` | Preview cron jobs without executing them. |
| `--create-job-now` | Creates a Job from each CronJob on the cluster now (implies manifest mode; combine with --apply to publish first). |
| `-h, --help` | display help for command |

---

## underpost fs

Uploads, pulls, or deletes Cloudinary assets and synchronizes the selected storage manifest.

**Usage:** `underpost fs [options] [path]`

### Arguments

| Argument | Description |
| --- | --- |
| `path` | Selects one file or all files below a directory. Required unless --tracked is set. |

### Options

| Option | Description |
| --- | --- |
| `--rm` | Deletes selected remote assets and their manifest entries. |
| `--git` | Restricts filesystem selection to Git-tracked files. Does not change Git state. |
| `--recursive` | Compatibility option. Directories always select files recursively. |
| `--tracked` | Selects only manifest entries. An optional path limits their scope. An upload with no matching entry selects the local files. |
| `--deploy-id <deploy-id>` | Selects the deployment configuration. |
| `--pull` | Downloads selected manifest assets. Use --tracked to restore missing local files. |
| `--omit-unzip` | With --pull, keeps the downloaded .zip file and skips extraction. |
| `--force` | Overwrites remote uploads or local downloads. Does not change selection. |
| `--storage-id <sub-id>` | Selects storage.<sub-id>.json. The default is storage.json. |
| `--key <path>` | Selects one exact manifest key within the path scope and filters. |
| `--from-key <path>` | Starts an inclusive range in manifest key order. |
| `--to-key <path>` | Ends an inclusive range. The default start is the first manifest key. |
| `--key-regex <pattern>` | Filters manifest keys by a JavaScript regular expression. |
| `-h, --help` | display help for command |

---

## underpost monitor

Manages health server monitoring, the cluster observability stack, and host dashboards.

**Usage:** `underpost monitor [options] [deploy-id] [env]`

### Arguments

| Argument | Description |
| --- | --- |
| `deploy-id` | The deployment configuration ID to monitor. With the observability flags it selects which deploys are scraped; "dd" covers every deploy in dd.routes. (default: "dd") |
| `env` | Optional: The environment to monitor (e.g., "development", "production"). (default: "development") |

### Options

| Option | Description |
| --- | --- |
| `--ms-interval <ms-interval>` | Sets a custom millisecond interval for monitoring checks. |
| `--now` | Executes the monitor script immediately. |
| `--single` | Disables recurrence, running the monitor script only once. |
| `--replicas <replicas>` | Sets a custom number of replicas for monitoring. Defaults to 1. |
| `--type <type>` | Sets a custom monitor type. |
| `--sync` | Synchronizes with current proxy deployments and traffic configurations. |
| `--namespace <namespace>` | Sets the Kubernetes namespace for the deployment. Defaults to "default". |
| `--timeout-response <duration>` | Sets HTTPProxy per-route response timeout (e.g., "5s"). |
| `--timeout-idle <duration>` | Sets HTTPProxy per-route idle timeout (e.g., "10s", "infinity"). |
| `--retry-count <count>` | Sets HTTPProxy per-route retry count (e.g., 3). |
| `--retry-per-try-timeout <duration>` | Sets HTTPProxy retry per-try timeout (e.g., "150ms"). |
| `--disable-private-conf-update` | Disables updates to private configuration during execution. |
| `--versions <deployment-versions>` | Specifies the deployment versions to monitor. eg. "blue,green", "green" |
| `--ready-deployment` | Run in ready deployment monitor mode. |
| `--promote` | Promotes the deployment after monitoring. |
| `--observability` | Deploys or converges the cluster observability stack (Prometheus, Alertmanager, Blackbox Exporter, Grafana), ensuring the Gateway API metrics source and local-path storage provisioner are ready. |
| `--sync-prom` | Regenerates the scrape configuration, alert rules and Alertmanager route from the live deploy configuration and event registry, applies Grafana admin credentials, then reloads or rolls only the affected component. |
| `--events <event-ids>` | Comma-separated event ids to provision; empty provisions every registered event. |
| `--webhook-url <url>` | URL Alertmanager delivers events to (defaults to the node address of `event --serve`). |
| `--extra-targets <targets>` | Comma-separated additional "host:port" scrape targets. |
| `--metrics-server` | Installs the Kubernetes metrics-server (kubectl top / HPA resource API). Skipped on K3s, which bundles its own, unless --force. |
| `--cockpit` | Installs and enables the Cockpit KVM dashboard on this host (cockpit, cockpit-machines, libvirt) and opens its firewall service. |
| `--cockpit-stop` | Stops and disables the Cockpit KVM dashboard and closes its firewall service. |
| `--grafana-host <host>` | Publishes Grafana at https://<host>/grafana through the edge Gateway that already serves that hostname. |
| `--node-port` | Publishes Grafana on the node's LAN address (port 32300). |
| `--expose-grafana` | Republishes Grafana with --grafana-host / --node-port without redeploying the stack. |
| `--webhook-token` | Prints the shared event webhook token, to persist as UNDERPOST_EVENT_TOKEN in the host configuration. |
| `--prune-series` | Deletes Prometheus series of targets the current configuration no longer renders (retired domains and probes). Runs after --sync-prom when both are given. |
| `--dry-run` | With --prune-series, lists the retired series without deleting them. |
| `--node-name <k8s-node-name>` | The node of the monitoring workloads; overrides the scheduling of conf.cluster.json. Moving Grafana deletes and recreates its node-local data. |
| `--kubeadm` | Treats the cluster as kubeadm when resolving node and host addresses. |
| `--kind` | Treats the cluster as Kind (Docker nodes) when resolving node and host addresses. |
| `--k3s` | Treats the cluster as K3s when resolving node and host addresses. |
| `--force` | Confirms an install that would replace a bundled component (e.g. --metrics-server on K3s). |
| `--dev` | Sets the development cli context (scrapes over HTTP, defaults the cluster type to Kind). |
| `-h, --help` | display help for command |

---

## underpost event

Dispatches operational events and provisions the monitoring rules that trigger them.

**Usage:** `underpost event [options] [event-id]`

### Arguments

| Argument | Description |
| --- | --- |
| `event-id` | The operational event to dispatch. Options: wireguard-server-down,wireguard-spoke-down,public-ingress-down,node-cpu-limit-exceeded,node-memory-limit-exceeded,hub-bandwidth-limit-exceeded,node-disk-limit-exceeded,node-network-traffic-exceeded. |

### Options

| Option | Description |
| --- | --- |
| `--deploy` | Merges the event into the set already deployed in the cluster and republishes the monitoring configuration. |
| `--undeploy` | Removes the event from the deployed set and republishes without it. |
| `--suspend-events <state-file>` | Saves the exact deployed event set and temporarily republishes observability without event probes or alerts. |
| `--resume-events <state-file>` | Restores and resynchronizes the exact event set saved by --suspend-events, then removes the state file. |
| `--serve` | Runs the Alertmanager webhook receiver in the foreground (use --service to supervise it). |
| `--service` | Installs the receiver on a WireGuard control node as the underpost-event systemd unit. It remains available while the tunnel is down. |
| `--service-stop` | Stops, disables and removes the underpost-event systemd unit. |
| `--service-status` | Reports whether the underpost-event unit is active and enabled. |
| `--list` | Lists the registered events with their resolved probe targets. |
| `--port <port>` | Listening port for --serve and the generated unit (default: 39099). |
| `--cooldown-ms <ms>` | Minimum interval between two dispatches of one event in --serve (default: 10000). |
| `--spoke <spoke-id>` | Spoke to remediate when dispatching wireguard-spoke-down by hand; a webhook takes it from the alert labels. |
| `--nodes <node-names>` | Comma-separated node documents to act on — hubs for wireguard-server-down, peers for wireguard-spoke-down. Empty covers every registered hub, or every peer of this node hub. |
| `--namespace <namespace>` | Kubernetes namespace holding the observability stack. Defaults to "default". |
| `--webhook-url <url>` | URL Alertmanager delivers to, written into the generated route with --deploy. |
| `--dev` | Sets the development cli context. |
| `--dry-run` | Reports the remediation the event would run without executing it. |
| `--no-notify` | Skips the operational alert declared in engine-private/deploy/conf.event.json. |
| `--e2e-test` | Rehearses the event against the live edge: breaks the real subject, waits for the probe to fail, runs the remediation, and verifies the notification was actually sent. |
| `-h, --help` | display help for command |

---

## underpost ssh

Manages cluster scoped SSH credentials and sessions for remote access to cluster nodes or services. Users are registered in engine-private/deploy/conf.users.json and keys are stored in engine-private/deploy/users/<user>.

**Usage:** `underpost ssh [options]`

### Options

| Option | Description |
| --- | --- |
| `--generate` | Generates new ssh credential and stores it in current private keys file storage. |
| `--user <user>` | Sets custom ssh user |
| `--password <password>` | Sets custom ssh password |
| `--host <host>` | Sets custom ssh host |
| `--port <port>` | Sets custom ssh port |
| `--filter <filter>` | Filters ssh user credentials from current private keys file storage. |
| `--groups <groups>` | Sets comma-separated ssh user groups for the ssh user credential. |
| `--user-add` | Adds a new ssh user credential to current private keys file storage. |
| `--user-remove` | Removes an existing ssh user credential from current private keys file storage. |
| `--user-ls` | Lists all ssh user credentials from current private keys file storage. |
| `--start` | Starts an SSH session with the specified credentials. |
| `--reset` | Resets ssh configuration and deletes all stored credentials. |
| `--keys-list` | Lists all ssh keys from current private keys file storage. |
| `--hosts-list` | Lists all ssh hosts from current private keys file storage. |
| `--disable-password` | Disables password authentication for the SSH session. |
| `--key-test` | Tests the SSH key using ssh-keygen. |
| `--stop` | Stops the SSH service. |
| `--status` | Checks the status of the SSH service. |
| `-h, --help` | display help for command |

---

## underpost wireguard

Manages the WireGuard L3 hub-and-spoke transport and the HAProxy edge gateway in front of it.

**Usage:** `underpost wireguard [options]`

### Options

| Option | Description |
| --- | --- |
| `--deploy-id <deploy-id>` | Deploy IDs whose conf.server.json/conf.instances.json define the routes. Accepts one id or a comma-separated list; defaults to "dd", every deploy in dd.routes, because the edge holds one pair of map files for the whole cluster. |
| `--interface <name>` | WireGuard interface name (default: "wg0"). |
| `--wireguard-install` | Installs the wireguard-tools, haproxy and iptables host packages. |
| `--wireguard-key` | Creates the key pair of this machine once and prints its public key. Needs no node document, so a new machine runs it before it enrolls. The private key stays in /etc/wireguard. |
| `--wireguard-setup` | Generates keys, builds the interface config, and applies local network rules. |
| `--node-config` | Writes a node identity under deploy/nodes, named after the machine it describes. |
| `--node-name <node-name>` | Node record to write; defaults to this hostname, which is what runtime commands resolve their identity by. |
| `--node-role <role>` | Machine role: hub, control, worker or workstation. A workstation is a WireGuard peer for human work: not a Kubernetes node, not synced or repaired by the fleet, and limited by the hub to the workstation port of fleet peers. |
| `--hub-host <ipv4>` | Static public IPv4 key of the hub topology this node belongs to. |
| `--port <port>` | WireGuard UDP listening port (default: 51820). |
| `--cidr <cidr>` | Hub interface address on a hub; overlay subnet routed through the hub on every other role. |
| `--peer-ip <ip>` | Tunnel address used by --peer-add or to update the selected node during setup. |
| `--peer-id <peer-id>` | Topology peer represented by a node identity of any role but hub. |
| `--public-key <key>` | Public key used by off-host topology authoring or --peer-add. |
| `--peer-add <peer-id>` | Registers a spoke and applies it to the running hub without a restart. |
| `--peer-remove <peer-id>` | Removes a peer from the selected topology and running hub. |
| `--allowed-ips <cidrs>` | Comma-separated CIDRs routed to the spoke (e.g. "10.0.0.2/32,192.168.10.0/24"). |
| `--hosts <hosts>` | Comma-separated hostnames bound to the spoke, overriding instance resolution. |
| `--instances <instances>` | Comma-separated conf.instances.json ids bound to the spoke. |
| `--management-host <host>` | Stable LAN or management address used to repair this peer when its tunnel address is unavailable. |
| `--default` | Marks the spoke as the fallback for hostnames that match no other binding. |
| `--haproxy-setup` | Installs HAProxy, publishes the current routes, and enables the daemon. |
| `--haproxy-sync` | Recompiles the SNI/Host maps from deploy config and hot-reloads HAProxy. |
| `--status` | Prints the whole edge context without changing anything: role, interface, tunnel address, public key, daemon states, peers with their bindings and link health, and the resolved routing. |
| `--build-conf` | Writes only engine-private/deploy/conf.wireguard.json and touches no host state. Combine with --wireguard-setup / --peer-add / --peer-remove to author the topology off-box; alone it normalizes and validates the existing topology. |
| `--forward-proxy-server` | Ensures the hub HTTP/CONNECT forward proxy runs as the underpost-forward-proxy systemd service, bound to the tunnel address only (default port 1080), and returns. Authenticates every request with FORWARD_PROXY_API_KEY, so spokes can reach the internet through the VPS public address. Idempotent: re-running converges on the one service and restarts it only when the unit actually changed. |
| `--forward-proxy-server-host <host>` | Address the forward proxy binds, overriding the selected hub tunnel address. |
| `--forward-proxy-server-port <port>` | Port the forward proxy binds (default: 1080). |
| `--ssh-forward-port <port>` | Publishes the default spoke SSH port on this public TCP port of the hub, so CI with no fixed address can reach the cluster node (e.g. 2222). "0" closes it. Stored in hub topology. |
| `--sync` | Brings every registered node engine checkout up to date over its SSH identity: clean, pull, fix and install. |
| `--nodes <node-names>` | Comma-separated node documents --sync, --cmd, --node-exporter and --connect-uri act on. Empty covers every hub and every peer of this node hub. |
| `--connect-uri` | Prints the SSH command that reaches each node named by --nodes, joining the node document under engine-private/deploy/nodes to the management address it is registered under in engine-private/deploy/conf.users.json. Empty --nodes lists the whole fleet. |
| `--copy` | Copies the --connect-uri or --wireguard-key output to the clipboard instead of printing it. |
| `--cmd <command-list>` | Comma-separated custom commands to run on the selected nodes over their SSH identity. Given with --sync, only these run in place of the sync steps. |
| `--node-exporter` | Provisions the host metrics collector as a systemd service on the selected hub nodes, bound to their tunnel address, so machines outside the cluster report hardware metrics like every cluster node. |
| `--repo-engine <repo>` | Engine repository --sync pulls from, as owner/repo or a clone URL. Defaults to the configured account engine. |
| `--repo-engine-private <repo>` | Private engine repository --sync pulls from, as owner/repo or a clone URL. Defaults to the configured private repo derived from --repo-engine. |
| `--wireguard-start` | Enables and starts wg-quick@<interface> and the QUIC forward. |
| `--wireguard-restart` | Restarts wg-quick@<interface> and restores the hub QUIC forward. |
| `--wireguard-stop` | Tears down the interface and removes its transient packet rules. |
| `--check` | Waits for an active interface and a fresh handshake with its required peer. |
| `--check-timeout <seconds>` | Maximum wait for --check (default: 30). |
| `--expected-role <role>` | Refuses setup/restart/check unless this host has the expected node role. |
| `--expected-id <peer-id>` | Refuses setup/restart/check unless this node represents the expected peer id. |
| `--wireguard-reset` | Removes generated host state, keeping keys, topology and node identity. |
| `--wireguard-reinstall` | Full purge, package reinstall and re-key; updates the selected topology key. |
| `--dry-run` | Prints the files and commands the run would apply, without touching the host. |
| `-h, --help` | display help for command |

---

## underpost haproxy

Manages the HAProxy edge gateway over the WireGuard transport (same subsystem as `underpost wireguard`).

**Usage:** `underpost haproxy [options]`

### Options

| Option | Description |
| --- | --- |
| `--deploy-id <deploy-id>` | Deploy IDs whose conf.server.json/conf.instances.json define the routes. Accepts one id or a comma-separated list; defaults to "dd", every deploy in dd.routes, because the edge holds one pair of map files for the whole cluster. |
| `--interface <name>` | WireGuard interface name (default: "wg0"). |
| `--wireguard-install` | Installs the wireguard-tools, haproxy and iptables host packages. |
| `--wireguard-key` | Creates the key pair of this machine once and prints its public key. Needs no node document, so a new machine runs it before it enrolls. The private key stays in /etc/wireguard. |
| `--wireguard-setup` | Generates keys, builds the interface config, and applies local network rules. |
| `--node-config` | Writes a node identity under deploy/nodes, named after the machine it describes. |
| `--node-name <node-name>` | Node record to write; defaults to this hostname, which is what runtime commands resolve their identity by. |
| `--node-role <role>` | Machine role: hub, control, worker or workstation. A workstation is a WireGuard peer for human work: not a Kubernetes node, not synced or repaired by the fleet, and limited by the hub to the workstation port of fleet peers. |
| `--hub-host <ipv4>` | Static public IPv4 key of the hub topology this node belongs to. |
| `--port <port>` | WireGuard UDP listening port (default: 51820). |
| `--cidr <cidr>` | Hub interface address on a hub; overlay subnet routed through the hub on every other role. |
| `--peer-ip <ip>` | Tunnel address used by --peer-add or to update the selected node during setup. |
| `--peer-id <peer-id>` | Topology peer represented by a node identity of any role but hub. |
| `--public-key <key>` | Public key used by off-host topology authoring or --peer-add. |
| `--peer-add <peer-id>` | Registers a spoke and applies it to the running hub without a restart. |
| `--peer-remove <peer-id>` | Removes a peer from the selected topology and running hub. |
| `--allowed-ips <cidrs>` | Comma-separated CIDRs routed to the spoke (e.g. "10.0.0.2/32,192.168.10.0/24"). |
| `--hosts <hosts>` | Comma-separated hostnames bound to the spoke, overriding instance resolution. |
| `--instances <instances>` | Comma-separated conf.instances.json ids bound to the spoke. |
| `--management-host <host>` | Stable LAN or management address used to repair this peer when its tunnel address is unavailable. |
| `--default` | Marks the spoke as the fallback for hostnames that match no other binding. |
| `--haproxy-setup` | Installs HAProxy, publishes the current routes, and enables the daemon. |
| `--haproxy-sync` | Recompiles the SNI/Host maps from deploy config and hot-reloads HAProxy. |
| `--status` | Prints the whole edge context without changing anything: role, interface, tunnel address, public key, daemon states, peers with their bindings and link health, and the resolved routing. |
| `--build-conf` | Writes only engine-private/deploy/conf.wireguard.json and touches no host state. Combine with --wireguard-setup / --peer-add / --peer-remove to author the topology off-box; alone it normalizes and validates the existing topology. |
| `--forward-proxy-server` | Ensures the hub HTTP/CONNECT forward proxy runs as the underpost-forward-proxy systemd service, bound to the tunnel address only (default port 1080), and returns. Authenticates every request with FORWARD_PROXY_API_KEY, so spokes can reach the internet through the VPS public address. Idempotent: re-running converges on the one service and restarts it only when the unit actually changed. |
| `--forward-proxy-server-host <host>` | Address the forward proxy binds, overriding the selected hub tunnel address. |
| `--forward-proxy-server-port <port>` | Port the forward proxy binds (default: 1080). |
| `--ssh-forward-port <port>` | Publishes the default spoke SSH port on this public TCP port of the hub, so CI with no fixed address can reach the cluster node (e.g. 2222). "0" closes it. Stored in hub topology. |
| `--sync` | Brings every registered node engine checkout up to date over its SSH identity: clean, pull, fix and install. |
| `--nodes <node-names>` | Comma-separated node documents --sync, --cmd, --node-exporter and --connect-uri act on. Empty covers every hub and every peer of this node hub. |
| `--connect-uri` | Prints the SSH command that reaches each node named by --nodes, joining the node document under engine-private/deploy/nodes to the management address it is registered under in engine-private/deploy/conf.users.json. Empty --nodes lists the whole fleet. |
| `--copy` | Copies the --connect-uri or --wireguard-key output to the clipboard instead of printing it. |
| `--cmd <command-list>` | Comma-separated custom commands to run on the selected nodes over their SSH identity. Given with --sync, only these run in place of the sync steps. |
| `--node-exporter` | Provisions the host metrics collector as a systemd service on the selected hub nodes, bound to their tunnel address, so machines outside the cluster report hardware metrics like every cluster node. |
| `--repo-engine <repo>` | Engine repository --sync pulls from, as owner/repo or a clone URL. Defaults to the configured account engine. |
| `--repo-engine-private <repo>` | Private engine repository --sync pulls from, as owner/repo or a clone URL. Defaults to the configured private repo derived from --repo-engine. |
| `--wireguard-start` | Enables and starts wg-quick@<interface> and the QUIC forward. |
| `--wireguard-restart` | Restarts wg-quick@<interface> and restores the hub QUIC forward. |
| `--wireguard-stop` | Tears down the interface and removes its transient packet rules. |
| `--check` | Waits for an active interface and a fresh handshake with its required peer. |
| `--check-timeout <seconds>` | Maximum wait for --check (default: 30). |
| `--expected-role <role>` | Refuses setup/restart/check unless this host has the expected node role. |
| `--expected-id <peer-id>` | Refuses setup/restart/check unless this node represents the expected peer id. |
| `--wireguard-reset` | Removes generated host state, keeping keys, topology and node identity. |
| `--wireguard-reinstall` | Full purge, package reinstall and re-key; updates the selected topology key. |
| `--dry-run` | Prints the files and commands the run would apply, without touching the host. |
| `-h, --help` | display help for command |

---

## underpost vultr

Meters the edge VPS bandwidth against its Vultr plan quota and blocks egress before overage accrues.

**Usage:** `underpost vultr [options] [deploy-list]`

### Arguments

| Argument | Description |
| --- | --- |
| `deploy-list` | A comma-separated list of deployment IDs, logged for attribution. |

### Options

| Option | Description |
| --- | --- |
| `--instance-id <instance-id>` | Vultr instance id to meter (default: VULTR_INSTANCE_ID). |
| `--api-key <api-key>` | Vultr API key (default: VULTR_API_KEY). Prefer the environment over this flag. |
| `--threshold <ratio>` | Fraction of the plan quota that triggers the egress block; "0.80" and "80" are both accepted (default: 0.80). |
| `--metric <metric>` | "total" (incoming + outgoing, default) or "outgoing" for egress alone. |
| `--month <yyyy-mm>` | Billing month to sum (default: the current UTC month). |
| `--all-dates` | Sum every daily bucket the API returns instead of scoping to one month. |
| `--host <ip>` | Edge VPS to block (default: VULTR_VPS_IP, then DEFAULT_SSH_HOST). |
| `--user <user>` | SSH user on the edge VPS (default: VULTR_SSH_USER, then DEFAULT_SSH_USER, then "root"). |
| `--key-path <path>` | SSH private key (default: VULTR_SSH_KEY_PATH, then DEFAULT_SSH_KEY_PATH). |
| `--port <port>` | SSH port on the edge VPS (default: VULTR_SSH_PORT, then DEFAULT_SSH_PORT, then 22). |
| `--force` | Re-apply the egress block even if it was already applied for this cycle. |
| `--auto-unblock` | Restore egress automatically once consumption falls back under the threshold. |
| `--dry-run` | Reports the consumption and the action it would take, without touching the edge VPS. |
| `-h, --help` | display help for command |

---

## underpost sandbox

The Development Sandbox: a local Kind cluster with MongoDB and Valkey, exposed on 127.0.0.1. It never resets a cluster, a database or a volume, and never stops a process it did not start.

**Usage:** `underpost sandbox [options] <operation> [cluster-name]`

### Arguments

| Argument | Description |
| --- | --- |
| `operation` | up: create the Kind cluster when it is missing, provision MongoDB and Valkey when they are missing, and hold their loopback forwards until Ctrl+C; status: the identity, session and service checks (JSON); down: stop the session. |
| `cluster-name` | The Kind cluster of the Development Sandbox. (default: "kind") |

### Options

| Option | Description |
| --- | --- |
| `--namespace-workloads <namespace>` | The namespace of the application workloads; overrides --namespace and conf.cluster.json. |
| `--namespace-releases <namespace>` | The namespace of the release Jobs; overrides conf.cluster.json. |
| `--namespace-platform <namespace>` | The namespace of the Underpost gateway and ingress; overrides conf.cluster.json. |
| `--namespace-operations <namespace>` | The namespace of the operational CronJobs; overrides conf.cluster.json. |
| `--namespace-observability <namespace>` | The namespace of the monitoring stack; overrides conf.cluster.json. |
| `--namespace-mongodb <namespace>` | The namespace of MongoDB; overrides conf.cluster.json. |
| `--namespace-mariadb <namespace>` | The namespace of MariaDB; overrides conf.cluster.json. |
| `--namespace-mysql <namespace>` | The namespace of MySQL; overrides conf.cluster.json. |
| `--namespace-postgresql <namespace>` | The namespace of PostgreSQL; overrides conf.cluster.json. |
| `--namespace-valkey <namespace>` | The namespace of Valkey; overrides conf.cluster.json. |
| `--namespace-ipfs <namespace>` | The namespace of IPFS Cluster; overrides conf.cluster.json. |
| `--namespace-envoy-gateway <namespace>` | The namespace of Envoy Gateway; overrides conf.cluster.json. |
| `--namespace-cert-manager <namespace>` | The namespace of cert-manager; overrides conf.cluster.json. |
| `--namespace <namespace>` | The namespace of the sandbox services; without it, the development section of conf.cluster.json places each one. |
| `--ipfs` | For up: also provision and expose the IPFS Cluster (API 5001, Cluster API 9094, gateway 8080). |
| `-h, --help` | display help for command |

---

## underpost namespace

Kubernetes placement from engine-private/deploy/conf.cluster.json: the context, the DNS domain and the namespace of each resource, the live cluster against it, and its migration. Capture is not a backup. Only migrate moves a resource: it deletes the source installation, installs it again in its destination and restarts its consumers, one unit at a time; until a unit is ready in its destination every command reaches its source. Nothing here deletes a namespace or rewrites an environment file.

**Usage:** `underpost namespace [options] <operation> [action] [name]`

### Arguments

| Argument | Description |
| --- | --- |
| `operation` | target: the cluster target (environment, context, kubeconfig, runtime, profile) against the live cluster, the identity to declare in environments.<env>.cluster and what refuses a change (exit 3 when refused); status: the cluster, the placement, the state of each resource and endpoint, the blockers and the next command; resolve: the namespace, node, context and source of each placed resource; env: shell assignments for deploy scripts; profile list, profile show <profile>: the placement profiles; nodes, nodes audit: the node groups against the node records and the cluster; nodes identify <record>: record the Kubernetes node of a node record; audit: compare the cluster and the deployment endpoints with the placement (exit 3 on an error); capture: save a read-only, sanitized record of the live cluster; adopt: the placement a capture observes, written with --write-config; plan: plan the migration from a capture to --target; migrate: recreate each unit of a plan in its destination, or one --resource; reconcile: create and label the missing namespaces Underpost owns; repair: reconcile, and suspend the duplicate CronJobs outside the operations namespace. Every change is a server dry run unless --apply. |
| `action` | For resolve: one placed resource; for profile: list or show; for nodes: audit or identify. |
| `name` | For profile show: a profile; for nodes identify: a node record of engine-private/deploy/nodes. |

### Options

| Option | Description |
| --- | --- |
| `--namespace-workloads <namespace>` | The namespace of the application workloads; overrides --namespace and conf.cluster.json. |
| `--namespace-releases <namespace>` | The namespace of the release Jobs; overrides conf.cluster.json. |
| `--namespace-platform <namespace>` | The namespace of the Underpost gateway and ingress; overrides conf.cluster.json. |
| `--namespace-operations <namespace>` | The namespace of the operational CronJobs; overrides conf.cluster.json. |
| `--namespace-observability <namespace>` | The namespace of the monitoring stack; overrides conf.cluster.json. |
| `--namespace-mongodb <namespace>` | The namespace of MongoDB; overrides conf.cluster.json. |
| `--namespace-mariadb <namespace>` | The namespace of MariaDB; overrides conf.cluster.json. |
| `--namespace-mysql <namespace>` | The namespace of MySQL; overrides conf.cluster.json. |
| `--namespace-postgresql <namespace>` | The namespace of PostgreSQL; overrides conf.cluster.json. |
| `--namespace-valkey <namespace>` | The namespace of Valkey; overrides conf.cluster.json. |
| `--namespace-ipfs <namespace>` | The namespace of IPFS Cluster; overrides conf.cluster.json. |
| `--namespace-envoy-gateway <namespace>` | The namespace of Envoy Gateway; overrides conf.cluster.json. |
| `--namespace-cert-manager <namespace>` | The namespace of cert-manager; overrides conf.cluster.json. |
| `--namespace <namespace>` | The legacy namespace override of the workloads. |
| `--deploy-id <deploy-id>` | For resolve and env: the deployment whose workloads to place, which a migration can move alone. |
| `--dev` | Reads the development section of engine-private/deploy/conf.cluster.json. |
| `--env <env>` | Reads the section of this environment: production, development or test. |
| `--json` | Prints JSON. |
| `--capture <id>` | For adopt and plan: a capture id, or latest (the default). |
| `--map <resource=namespace,...>` | For adopt: the namespace of a resource that runs in more than one. |
| `--write-config` | For adopt: write the section to conf.cluster.json, after a backup of the file. |
| `--target <target>` | For plan: recommended (the default), legacy, another profile or configured. |
| `--kubernetes-node <node>` | For nodes identify: the Kubernetes node of the record. |
| `--plan <id>` | For migrate: a plan id, or latest (the default). |
| `--resource <unit>` | For migrate: the one unit to run, for example datastores/mongodb, workloads/dd-core or platform. |
| `--list` | For migrate: the units of the plan in execution order, with their status. |
| `--status` | For migrate: the plan, what each unit deletes, keeps and installs, and its journal. |
| `--verify` | For migrate: the status of each unit, or of --resource, and its source cleanup, from the live cluster. |
| `--resume` | For migrate: run each unit a run left in progress. |
| `--confirm-destructive` | For migrate: accept that a unit deletes or discards data. Underpost backs up, copies and restores none. |
| `--dry-run` | Previews each change, the adoption, or the next operation of each unit. The default. |
| `--apply` | For reconcile, repair and migrate: make the changes, then verify them; for nodes identify: write the record. |
| `-h, --help` | display help for command |

---

## underpost tls

TLS lifecycle: the ACME ClusterIssuer, the cert-manager Certificates, the TLS Secrets and self-signed TLS of the hosts the deployments declare. environments.<env>.tls of conf.cluster.json sets the mode. It never deletes a Certificate or a TLS Secret to renew it, and never changes a workload.

**Usage:** `underpost tls [options] <operation> [action]`

### Arguments

| Argument | Description |
| --- | --- |
| `operation` | status: the TLS mode, the issuer and the state of each host; audit: the findings (exit 3 on an error); reconcile: the issuer, the TLS Secret and the Certificate of each host; renew: issue the certificate of each --host again; issuer: the ACME ClusterIssuer. |
| `action` | For issuer: status (the default) or reconcile. |

### Options

| Option | Description |
| --- | --- |
| `--namespace-workloads <namespace>` | The namespace of the application workloads; overrides --namespace and conf.cluster.json. |
| `--namespace-releases <namespace>` | The namespace of the release Jobs; overrides conf.cluster.json. |
| `--namespace-platform <namespace>` | The namespace of the Underpost gateway and ingress; overrides conf.cluster.json. |
| `--namespace-operations <namespace>` | The namespace of the operational CronJobs; overrides conf.cluster.json. |
| `--namespace-observability <namespace>` | The namespace of the monitoring stack; overrides conf.cluster.json. |
| `--namespace-mongodb <namespace>` | The namespace of MongoDB; overrides conf.cluster.json. |
| `--namespace-mariadb <namespace>` | The namespace of MariaDB; overrides conf.cluster.json. |
| `--namespace-mysql <namespace>` | The namespace of MySQL; overrides conf.cluster.json. |
| `--namespace-postgresql <namespace>` | The namespace of PostgreSQL; overrides conf.cluster.json. |
| `--namespace-valkey <namespace>` | The namespace of Valkey; overrides conf.cluster.json. |
| `--namespace-ipfs <namespace>` | The namespace of IPFS Cluster; overrides conf.cluster.json. |
| `--namespace-envoy-gateway <namespace>` | The namespace of Envoy Gateway; overrides conf.cluster.json. |
| `--namespace-cert-manager <namespace>` | The namespace of cert-manager; overrides conf.cluster.json. |
| `--env <env>` | The environment: production (the default), development or test. A change needs it. |
| `--deploy-id <deploy-ids>` | Comma-separated deployments of dd.routes: each host each one declares. |
| `--host <hosts>` | Comma-separated hosts, each with the one deployment that declares it. |
| `--all` | For a change: every deployment of dd.routes. |
| `--dry-run` | Previews each change as a server dry run. The default. |
| `--apply` | Makes the changes, then reads the cluster again to verify them. |
| `--json` | Prints JSON. |
| `-h, --help` | display help for command |

---

## underpost ingress

Routing: which deployment declares each host, the Gateway or HTTPProxy that serves it, and the routing objects a deployment leaves where it no longer runs. It never removes a shared object or one it cannot prove it owns.

**Usage:** `underpost ingress [options] <operation>`

### Arguments

| Argument | Description |
| --- | --- |
| `operation` | status: the routing object of each deployment and the listeners and routes of each host; audit: the findings (exit 3 on an error); reconcile: remove the stale routing of the deployments. |

### Options

| Option | Description |
| --- | --- |
| `--namespace-workloads <namespace>` | The namespace of the application workloads; overrides --namespace and conf.cluster.json. |
| `--namespace-releases <namespace>` | The namespace of the release Jobs; overrides conf.cluster.json. |
| `--namespace-platform <namespace>` | The namespace of the Underpost gateway and ingress; overrides conf.cluster.json. |
| `--namespace-operations <namespace>` | The namespace of the operational CronJobs; overrides conf.cluster.json. |
| `--namespace-observability <namespace>` | The namespace of the monitoring stack; overrides conf.cluster.json. |
| `--namespace-mongodb <namespace>` | The namespace of MongoDB; overrides conf.cluster.json. |
| `--namespace-mariadb <namespace>` | The namespace of MariaDB; overrides conf.cluster.json. |
| `--namespace-mysql <namespace>` | The namespace of MySQL; overrides conf.cluster.json. |
| `--namespace-postgresql <namespace>` | The namespace of PostgreSQL; overrides conf.cluster.json. |
| `--namespace-valkey <namespace>` | The namespace of Valkey; overrides conf.cluster.json. |
| `--namespace-ipfs <namespace>` | The namespace of IPFS Cluster; overrides conf.cluster.json. |
| `--namespace-envoy-gateway <namespace>` | The namespace of Envoy Gateway; overrides conf.cluster.json. |
| `--namespace-cert-manager <namespace>` | The namespace of cert-manager; overrides conf.cluster.json. |
| `--env <env>` | The environment: production (the default), development or test. A change needs it. |
| `--deploy-id <deploy-ids>` | Comma-separated deployments of dd.routes: each host each one declares. |
| `--host <hosts>` | Comma-separated hosts, each with the one deployment that declares it. |
| `--all` | For a change: every deployment of dd.routes. |
| `--dry-run` | Previews each change as a server dry run. The default. |
| `--apply` | Makes the changes, then reads the cluster again to verify them. |
| `--json` | Prints JSON. |
| `-h, --help` | display help for command |

---

## underpost run

Runs specified scripts using various runners.

**Usage:** `underpost run [options] <runner-id> [path]`

### Arguments

| Argument | Description |
| --- | --- |
| `runner-id` | The runner ID to run. Options: status,expose,metadata,svc-ls,svc-rm,node-move,cluster-build,template-deploy,template-deploy-local,docker-image,clean,pull,ssh-deploy,ide,crypto-policy,set-inotify,sync,net-tables,stop,tz,get-traffic,restore-mongo,ingress-refresh,instance-promote,instance,deploy-key,instance-build-manifest,ls-deployments,host-update,install-crio,dd-container,ip-info,db-client,git-conf,promote,cluster,gateway-status,deploy,disk-clean,disk-devices,disk-usage,dev,service,etc-hosts,log,ps,pid-info,background,ports,deploy-test,tf-vae-test,spark-template,kill,generate-pass,gpu-env,tf-gpu-test,playwright,deploy-job,push-bundle,pull-bundle,verify-bundle,prune-bundles,kubeadm-wireguard,build-cluster-deployment-manifests,monitor-ui,shared-dir,shared-dir-add-user. |
| `path` | The input value, identifier, or path for the operation. |

### Options

| Option | Description |
| --- | --- |
| `--namespace-workloads <namespace>` | The namespace of the application workloads; overrides --namespace and conf.cluster.json. |
| `--namespace-releases <namespace>` | The namespace of the release Jobs; overrides conf.cluster.json. |
| `--namespace-platform <namespace>` | The namespace of the Underpost gateway and ingress; overrides conf.cluster.json. |
| `--namespace-operations <namespace>` | The namespace of the operational CronJobs; overrides conf.cluster.json. |
| `--namespace-observability <namespace>` | The namespace of the monitoring stack; overrides conf.cluster.json. |
| `--namespace-mongodb <namespace>` | The namespace of MongoDB; overrides conf.cluster.json. |
| `--namespace-mariadb <namespace>` | The namespace of MariaDB; overrides conf.cluster.json. |
| `--namespace-mysql <namespace>` | The namespace of MySQL; overrides conf.cluster.json. |
| `--namespace-postgresql <namespace>` | The namespace of PostgreSQL; overrides conf.cluster.json. |
| `--namespace-valkey <namespace>` | The namespace of Valkey; overrides conf.cluster.json. |
| `--namespace-ipfs <namespace>` | The namespace of IPFS Cluster; overrides conf.cluster.json. |
| `--namespace-envoy-gateway <namespace>` | The namespace of Envoy Gateway; overrides conf.cluster.json. |
| `--namespace-cert-manager <namespace>` | The namespace of cert-manager; overrides conf.cluster.json. |
| `--cmd <command-list>` | Comma-separated list of commands to execute. |
| `--args <args-array>` | Array of arguments to pass to the command. |
| `--dev` | Sets the development context environment for the script. |
| `--build` | Set builder context runner |
| `--replicas <replicas>` | Sets a custom number of replicas for deployment. |
| `--pod-name <pod-name>` | Optional: Specifies the pod name for execution. |
| `--node-name <node-name>` | Optional: Specifies the node name for execution. |
| `--ingress-node <node-name>` | Dedicated node for the host-network underpost-ingress listener. Workload --node-name never relocates it. |
| `--ssh-key-path <path>` | Optional: replaces the registered SSH key of each remote workload node, for volume shipping, image releases and pre-pulls. |
| `--port <port>` | Optional: Specifies the port for execution. |
| `--expose-container-ports <ports>` | Comma-separated Service/container ports; multiple matched resources consume values by resource index. |
| `--expose-host-ports <ports>` | Comma-separated host ports paired with container ports by resource/port index. |
| `--local-proxy` | Starts the development path proxy after the expose runner creates its port-forwards. |
| `--etc-hosts` | Enables etc-hosts context for the runner execution. |
| `--volume-host-path <volume-host-path>` | Optional: Specifies the volume host path for test execution. |
| `--volume-mount-path <volume-mount-path>` | Optional: Specifies the volume mount path for test execution. |
| `--volume-type <volume-type>` | Optional: Specifies the volume type for test execution. |
| `--image-name <image-name>` | Optional: Specifies the image name for test execution. |
| `--source-revision <sha>` | For instance: run the image released for this exact source revision, by digest (CI image latest, or a build from --build-path). |
| `--build-path <dir>` | For instance with --source-revision: build that image from this checkout on the host. |
| `--image <image>` | Container image the deployment pulls and runs (sync). |
| `--runtime-image <name>` | src/runtime/<name> image family the cluster runner brings up (default "express"). |
| `--versions <deployment-versions>` | Comma-separated blue/green deployment versions (sync); unset resolves the next colour. |
| `--container-name <container-name>` | Optional: Specifies the container name for test execution. |
| `--namespace <namespace>` | Optional: Specifies the namespace for test execution. |
| `--tty` | Enables TTY for the container in deploy-job. |
| `--stdin` | Keeps STDIN open for the container in deploy-job. |
| `--restart-policy <policy>` | Sets the restart policy for the job in deploy-job. |
| `--runtime-class-name <name>` | Sets the runtime class name for the job in deploy-job. |
| `--image-pull-policy <policy>` | Sets the image pull policy for the job in deploy-job. |
| `--api-version <version>` | Sets the API version for the job manifest in deploy-job. |
| `--labels <labels>` | Optional: Specifies a comma-separated list of key-value pairs for labels (e.g., "app=my-app,env=prod"). |
| `--claim-name <name>` | Optional: Specifies the claim name for volume mounting in deploy-job. |
| `--kind-type <kind-type>` | Specifies the kind of Kubernetes resource (e.g., Job, Deployment) for deploy-job. |
| `--force` | Forces operation, overriding any warnings or conflicts. |
| `--tls` | Enables TLS for the runner execution. |
| `--reset` | Resets the runner state before execution. |
| `--dev-proxy-port-offset <port-offset>` | Sets a custom port offset for development proxy. |
| `--host-network` | Enables host network mode for the runner execution. |
| `--requests-memory <requests-memory>` | Requests memory limit for the runner execution. |
| `--requests-cpu <requests-cpu>` | Requests CPU limit for the runner execution. |
| `--limits-memory <limits-memory>` | Sets memory limit for the runner execution. |
| `--limits-cpu <limits-cpu>` | Sets CPU limit for the runner execution. |
| `--resource-template-id <resource-template-id >` | Specifies a resource template ID for the runner execution. |
| `--expose` | Enables exposure-only behavior in compatible runners; the expose runner itself does not require this flag. |
| `--conf-server-path <conf-server-path>` | Sets a custom configuration server path. |
| `--underpost-root <underpost-root>` | Sets a custom Underpost root path. |
| `--cmd-cron-jobs <cmd-cron-jobs>` | For sync: the pre-script commands each CronJob runs before its jobs (passed to cron --setup-start as --cmd). |
| `--deploy-id-cron-jobs <deploy-id-cron-jobs>` | Cron deploy-id to set up during sync; defaults to dd.cron, "none" skips cron setup entirely. |
| `--timezone <timezone>` | Sets the timezone for the runner execution. |
| `--kubeadm` | Sets the kubeadm cluster context for the runner execution. |
| `--k3s` | Sets the k3s cluster context for the runner execution. |
| `--kind` | Sets the kind cluster context for the runner execution. |
| `--traffic <traffic>` | Blue/green traffic colour to bake into generated manifests (default: blue); the colour `promote`, `instance` and `instance-promote` route to. `stop` accepts a comma list, e.g. blue,green. |
| `--git-clean` | Runs git clean on volume mount paths before copying. |
| `--deploy-id <deploy-id>` | Sets deploy id context for the runner execution. |
| `--user <user>` | Sets user context for the runner execution. |
| `--hosts <hosts>` | Comma-separated list of hosts for the runner execution. |
| `--split <mb>` | Zip part size in MB for push-bundle, or "none" to upload a single zip. Defaults to 8. |
| `--release <release-id>` | For push-bundle: the deploy release the client bundle belongs to. |
| `--bundle <reference>` | For pull-bundle and verify-bundle: the exact client bundle, <release-id>/<build-id>@sha256:<digest>. For prune-bundles: the comma-separated bundles to keep. |
| `--instance-id <instance-id>` | Sets instance id context for the runner execution. |
| `--pid <process-id>` | Sets process id context for the runner execution. |
| `--timeout-response <duration>` | Sets HTTPProxy per-route response timeout (e.g., "1s", "300ms", "infinity"). |
| `--timeout-idle <duration>` | Sets HTTPProxy per-route idle timeout (e.g., "10s", "infinity"). |
| `--retry-count <count>` | Sets HTTPProxy per-route retry count (e.g., 3). |
| `--retry-per-try-timeout <duration>` | Sets HTTPProxy retry per-try timeout (e.g., "150ms"). |
| `--gateway-class <name>` | GatewayClass name for generated Gateway manifests (default "eg"). |
| `--disable-http3` | Omits the QUIC/HTTP3 listener config and the Alt-Svc advertisement from Gateway API manifests. |
| `--quic-port <port>` | UDP port advertised for QUIC/HTTP3 in generated Gateway API manifests (default 443). |
| `--repo-engine-private <repo>` | Private configuration repository the pull runner checks out, as owner/repo or a clone URL. Defaults to the private repo derived from the engine source. |
| `--disable-private-conf-update` | Disables updates to private configuration during execution. |
| `--logs` | Streams logs during the runner execution. |
| `--monitor-status <status>` | Sets the status to monitor for pod/resource (default: "Running"). |
| `--monitor-status-kind-type <kind-type>` | Sets the Kubernetes resource kind type to monitor (default: "pods"). |
| `--monitor-status-delta-ms <milliseconds>` | Sets the polling interval in milliseconds for status monitoring (default: 1000). |
| `--monitor-status-max-attempts <attempts>` | Sets the maximum number of status check attempts (default: 600). |
| `--dry-run` | Preview operations without executing them. |
| `--from-n-commit <n>` | Number of commits back to use for message propagation in template-deploy (default: 1, last commit only). |
| `--create-job-now` | After applying cron manifests, immediately create a Job from each CronJob (forwarded to cron runner). |
| `--host-aliases <host-aliases>` | Adds entries to the Pod /etc/hosts via hostAliases. Format: semicolon-separated entries of "ip=hostname1,hostname2" (e.g., "127.0.0.1=foo.local,bar.local;10.1.2.3=foo.remote,bar.remote"). |
| `--copy` | Copies the runner output to the clipboard (supported by: generate-pass, template-deploy-local). |
| `--skip-full-build` | Skip client bundle rebuild; triggers pull-bundle in container startup (supported by: sync, template-deploy). |
| `--pull-bundle` | Explicitly download the pre-built client bundle from Cloudinary inside the container (supported by: sync, template-deploy). Use together with --skip-full-build. |
| `--remove` | Remove/teardown resources |
| `--test` | Enables test/generic-purpose mode for the runner (e.g. resolve no runtime repository of its own). |
| `--branch <branch>` | Sets the branch for git operations (default: current branch). |
| `-h, --help` | display help for command |

---

## underpost test

Runs the test projects locally, inside deployment pods, or as a cluster Job with Allure reporting.

**Usage:** `underpost test [options] [suite]`

### Arguments

| Argument | Description |
| --- | --- |
| `suite` | A comma-separated list of domains or projects to run. Domains: underpost, object-layer, item-ledger, cyberia, cryptokoyn, ecosystem, all. Projects: underpost:audit, underpost:unit, object-layer:unit, item-ledger:unit, cyberia:unit, cryptokoyn:unit, ecosystem:contract, underpost:integration:security, underpost:integration:network, underpost:integration:cluster, underpost:integration:ingress, underpost:integration:observability, underpost:integration, ecosystem:integration, cyberia:integration, item-ledger:integration, underpost:e2e, cyberia:e2e, item-ledger:contract. Defaults to every project, in order. (default: "") |

### Options

| Option | Description |
| --- | --- |
| `--itc` | Runs in this execution context instead of dispatching into deployment pods. |
| `--changed [base]` | Selects the domains the changed sources belong to, against a git ref (default: the working tree). |
| `--list` | Prints the projects a selector resolves to, and exits. |
| `--print` | Prints the resolved selector on stdout and exits, for a CI step to read. |
| `--deploy-list <deploy-list>` | A comma-separated list of deployment IDs to run the suite inside. |
| `--grep <pattern>` | Runs only tests whose name matches the pattern. |
| `--watch` | Keeps the runner open and re-runs affected suites on change. |
| `--no-coverage` | Skips coverage instrumentation and reporters. |
| `--footprint <footprint>` | How much of the machine the run can use. One of: safe, balanced, ci. safe One project per fresh process, one worker, one file and one test at a time, inside a host budget. The default. balanced One project per fresh process, two workers, parallel files where the project permits, inside a host budget. ci The whole selection in one process, on the Vitest default workers. For a runner that owns its machine. |
| `--batch-timeout <minutes>` | Stops a batch that runs longer than this and records it as timeout. |
| `--diagnose` | Records peak memory and CPU per batch, and logs heap and coverage timings. |
| `--allure` | Writes Allure results for the cluster dashboard alongside the run. |
| `--dashboard` | Applies the Allure dashboard to the cluster and exits. |
| `--job` | Runs the selected suite on the cluster as a Kubernetes Job (requires --image). |
| `--image <image>` | Image carrying the engine and its dependencies, for --job. |
| `--node-name <node-name>` | Pins the --job pod to this node. |
| `--host <host>` | Hostname to route the --dashboard sub-path on. |
| `--namespace <namespace>` | Kubernetes namespace for --dashboard, --job and --deploy-list. |
| `--dry-run` | Renders the --dashboard or --job manifests without applying them. |
| `--pod-name <pod-name>` | Waits for this cluster object to reach --pod-status instead of running tests. |
| `--pod-status <pod-status>` | Status --pod-name waits for (default: "Running"). |
| `--kind-type <kind-type>` | Kind --pod-name queries (default: "pods"). |
| `-h, --help` | display help for command |

---

## underpost docker-compose

General-purpose Docker Compose development pipeline (mirrors the Kubernetes dev stack).

**Usage:** `underpost docker-compose [options] [target]`

### Arguments

| Argument | Description |
| --- | --- |
| `target` | Optional service name for --logs, --shell, --restart, or --build. |

### Options

| Option | Description |
| --- | --- |
| `--install` | Install Docker Engine and the Compose v2 plugin on RHEL/Rocky hosts. |
| `--reset` | Comprehensive teardown (equivalent to cluster --reset): removes all stack containers, the network, named volumes (destroys data), orphans, and generated artifacts. |
| `--force` | Force reinstall (--install), remove volumes (--down), or also drop the env-file (--reset). |
| `--deploy-id <deploy-id>` | Deployment to run as the app container (default: dd-default). 'dd-default' self-bootstraps a fresh engine; any other id runs the standard 'underpost start' command (mirrors src/cli/deploy.js). |
| `--docker-compose-id <docker-compose-id>` | Selects a custom-workflow stack at engine-private/conf/<deploy-id>/docker-compose/<docker-compose-id>/. Its compose.env is operator-owned; docker-compose.yml and nginx.conf are rendered from the stack the project declares in src/projects/<project>/compose-stack.js, else used as-is. e.g. --deploy-id dd-cyberia --docker-compose-id cyberia for the Cyberia MMO ecosystem. |
| `--env <env>` | Deployment environment of a non-default deploy id or a custom stack (default: development). |
| `--generate` | Render dynamic supporting files (nginx router config, env-file, app-command override). |
| `--up` | Start the full stack detached (regenerates config first). |
| `--down` | Stop and remove containers (and orphans). |
| `--volumes` | With --down, also remove named volumes (destroys persisted data). |
| `--restart` | Restart services (optionally a single [target]). |
| `--build` | With --up rebuild images; alone, rebuilds images with --no-cache. |
| `--pull` | Pull upstream images for all services. |
| `--logs` | Follow logs for all services (optionally a single [target]). |
| `--status` | Show a formatted status table of services. |
| `--shell` | Open an interactive shell in [target] (default: app). |
| `--exec <subcommand>` | General-purpose passthrough docker compose subcommand. |
| `--compose-file <path>` | Path to the compose file (default: docker-compose.yml). |
| `--env-file <path>` | Path to the compose env-file (default: docker/compose.env). |
| `--nginx-conf <path>` | Path to the generated nginx config (default: docker/nginx/default.conf). |
| `-h, --help` | display help for command |

---

## underpost lxd

Manages LXD virtual machines as K3s nodes (control plane or workers).

**Usage:** `underpost lxd [options] [vm-id]`

### Arguments

| Argument | Description |
| --- | --- |
| `vm-id` | VM identifier shared by current-VM flags like --vm-create, --vm-delete, --vm-init, --vm-info, and --vm-test. |

### Options

| Option | Description |
| --- | --- |
| `--init` | Initializes LXD on the current machine via preseed. |
| `--reset` | Host-safe reset: removes proxy devices, stops/deletes VMs, drops admin-profile and lxdbr0. Does NOT touch the LXD snap or storage pools. |
| `--purge` | DESTRUCTIVE: gracefully shuts down the LXD daemon (60s timeout), then removes the LXD snap. Combine with --reset to wipe per-VM state first. Safe replacement for the prior aggressive teardown. |
| `--shutdown` | Pre-host-reboot procedure: gracefully stops every VM and the LXD daemon. Run BEFORE any reboot/poweroff to keep the host bootable. |
| `--restore` | Symmetric to --shutdown: starts the LXD daemon, waits for it to be responsive, then starts every VM. VMs created via admin-profile have boot.autostart=false, so this is the explicit "bring the lab back up" command. |
| `--install` | Installs the LXD snap. |
| `--dev` | Use local paths instead of the global npm installation. |
| `--create-virtual-network` | Creates the lxdbr0 bridge network. |
| `--ipv4-address <cidr>` | IPv4 address/CIDR for the lxdbr0 bridge network (default: "10.250.250.1/24"). |
| `--create-admin-profile` | Creates the admin-profile for VM management. |
| `--control` | Initialize the target VM as a K3s control plane node. |
| `--worker` | Initialize the target VM as a K3s worker node. |
| `--vm-create` | Copy the LXC launch command for the command argument [vm-id] to the clipboard. |
| `--vm-delete` | SAFELY stop and delete the command argument [vm-id] (removes proxy devices first, then stops, then deletes). Safe to re-run. |
| `--vm-init` | Bring the command argument [vm-id] up as a K3s node end-to-end: OS base setup, mirror /home/dd/engine into the VM, then K3s role install via the local engine (use with --control or --worker). |
| `--vm-info` | Display full configuration and status for the command argument [vm-id]. |
| `--vm-test` | Run connectivity and health checks on the command argument [vm-id]. |
| `--vm-sync-engine` | Re-copy the host engine source into the command argument [vm-id], overriding whatever is currently there (equivalent to the engine-bootstrap step of --vm-init in isolation). |
| `--root-size <gb-size>` | Root disk size in GiB for --vm-create (default: 32). |
| `--join-node <nodes>` | Join a K3s worker to a control plane. Standalone format: "workerName,controlName". When used with --vm-init --worker, provide just the control node name for auto-join. |
| `--expose <vm-name:ports>` | Proxy host ports to a VM (e.g., "k3s-control:80,443"). |
| `--node-port <port>` | Customizes the VM-side (connect) port for --expose, so the host listens on the given port but proxies to this NodePort inside the VM (e.g. expose host 27017 -> VM NodePort 32017). |
| `--delete-expose <vm-name:ports>` | Remove proxied ports from a VM (e.g., "k3s-control:80,443"). |
| `--copy` | For two-phase flows that surface a command for the user to execute (e.g. --create-admin-profile phase 1), copy the command to the clipboard instead of printing it to the terminal. |
| `--namespace <namespace>` | Kubernetes namespace context (defaults to "default"). |
| `--maas-project <project>` | LXD project managed by MAAS (e.g. "k3s-cluster"). When set, all lxc commands target this project so MAAS enumerates the VMs in its machines UI. |
| `--move-to-project` | Stop the [vm-id] VM in the default project, move it to --maas-project, then start it so MAAS picks it up. Requires --maas-project. |
| `-h, --help` | display help for command |

---

## underpost baremetal

Manages baremetal server operations, including installation, database setup, commissioning, and user management.

**Usage:** `underpost baremetal [options] [workflow-id]`

### Options

| Option | Description |
| --- | --- |
| `--ip-address <ip-address>` | The IP address of the control server or the local machine. |
| `--hostname <hostname>` | The hostname of the target baremetal machine. |
| `--ip-file-server <ip-file-server>` | The IP address of the file server (NFS/TFTP). |
| `--ip-config <ip-config>` | IP configuration string for the baremetal machine. |
| `--netmask <netmask>` | Netmask of network. |
| `--dns-server <dns-server>` | DNS server IP address. |
| `--control-server-install` | Installs the baremetal control server. |
| `--control-server-uninstall` | Uninstalls the baremetal control server. |
| `--control-server-restart` | Restarts the baremetal control server. |
| `--control-server-stop` | Stops the baremetal control server. |
| `--control-server-db-install` | Installs PostgreSQL 17 on this host for the control server, and reconciles the MAAS role and database from DB_PG_MAAS_*. Idempotent. |
| `--control-server-db-status` | Reports the control server database: host installation, MAAS role and owner, databases. |
| `--control-server-db-tables [database]` | Lists the tables of a control server database (default: DB_PG_MAAS_NAME). |
| `--control-server-db-drop <database>` | Drops the MAAS database and role. The value must repeat the DB_PG_MAAS_NAME database name. |
| `--control-server-db-uninstall` | Stops the control server database and removes its packages. The data directory stays. |
| `--control-server-db-purge-data` | With --control-server-db-uninstall: also deletes the data directory, when it holds no database but the MAAS one. |
| `--dry-run` | With a --control-server-db-* option: reports each change without making it. |
| `--create-machine` | Creates a new baremetal machine entry in the database. |
| `--mac <mac>` | Specifies the MAC address for baremetal machine operations. Use "random" for random MAC, "hardware" to use device's actual MAC (no spoofing), or specify a MAC address. |
| `--ipxe` | Chainloads iPXE to normalize identity before commissioning. |
| `--ipxe-rebuild` | Forces rebuild of iPXE binary with embedded boot script. |
| `--ipxe-build-iso <iso-path>` | Builds a standalone iPXE ISO with embedded script for the specified workflow ID. |
| `--install-packer` | Installs Packer CLI. |
| `--packer-maas-image-template <template-path>` | Creates a new image folder from canonical/packer-maas template path (requires workflow-id). |
| `--packer-workflow-id <workflow-id>` | Specifies the workflow ID for Packer MAAS image operations. |
| `--packer-maas-image-build` | Builds a MAAS image using Packer for the workflow specified by --packer-workflow-id. |
| `--packer-maas-image-upload` | Uploads an existing MAAS image artifact without rebuilding for the workflow specified by --packer-workflow-id. |
| `--packer-maas-image-cached` | Continue last build without removing artifacts (used with --packer-maas-image-build). |
| `--remove-machines <system-ids>` | Removes baremetal machines by comma-separated system IDs, or use "all" |
| `--clear-discovered` | Clears all discovered baremetal machines from the database. |
| `--commission` | Init workflow for commissioning a physical machine. |
| `--install-disk [device]` | Explicit target install disk for Rocky deployment (e.g. /dev/nvme0n1). Omit or leave empty to auto-detect the internal disk. |
| `--no-auto-install` | Disables the ephemeral runtime AUTO_INSTALL fallback (controller must trigger install). |
| `--no-remote-install` | Skips the controller-side remote install orchestration over SSH. |
| `--worker` | Post-install infra role: join the deployed node as a Kubernetes worker (requires --control <ip>). Without this flag the node is set up as a control-plane. |
| `--control <ip>` | Control-plane IP the worker node joins (used with --worker for kubeadm infra setup). |
| `--ssh-key-dir <dir>` | Directory holding the SSH key pair used for commissioning/orchestration (expects <dir>/id_rsa and <dir>/id_rsa.pub). Overrides the workflow "sshKeyDir"; defaults to engine-private/deploy/users/<user> for a non-root --user, otherwise engine-private/deploy. Supports a leading ~. |
| `--deploy-id <deploy-id>` | Deployment ID used to resolve the private engine repo cloned onto the node (engine-<suffix>-private. |
| `--user <user>` | SSH user whose cluster scoped key pair is used (engine-private/deploy/users/<user>/id_rsa) and the login user on an existing control-plane (defaults to root, whose key is engine-private/deploy/id_rsa). Mirrors the ssh command --user. |
| `--engine-repo <url>` | Custom engine repo cloned + normalized to /home/dd/engine on the node (default: <GITHUB_USERNAME>/engine). |
| `--engine-branch <branch>` | Branch of the engine repo to clone on the node. |
| `--engine-private-repo <url>` | Custom private repo cloned + normalized to /home/dd/engine/engine-private on the node (default: <GITHUB_USERNAME>/engine-<id>-private). |
| `--engine-private-branch <branch>` | Branch of the engine-private repo to clone on the node. |
| `--bootstrap-http-server-run` | Runs a temporary bootstrap HTTP server for generic purposes such as serving iPXE scripts or ISO images during commissioning. |
| `--bootstrap-http-server-path <path>` | Sets a custom bootstrap HTTP server path for baremetal commissioning. |
| `--bootstrap-http-server-port <port>` | Sets a custom bootstrap HTTP server port for baremetal commissioning. |
| `--iso-url <url>` | Uses a custom ISO URL for baremetal machine commissioning. |
| `--nfs-build` | Builds an NFS root filesystem for a workflow id config architecture using QEMU emulation. |
| `--nfs-mount` | Mounts the NFS root filesystem for a workflow id config architecture. |
| `--nfs-reset` | Resets the NFS server completely, closing all connections before reloading exports. |
| `--nfs-unmount` | Unmounts the NFS root filesystem for a workflow id config architecture. |
| `--nfs-build-server` | Builds the NFS server for a workflow id config architecture. |
| `--nfs-sh` | Copies QEMU emulation root entrypoint shell command to the clipboard. |
| `--cloud-init` | Sets the kernel parameters and sets the necessary seed users on the HTTP server. |
| `--cloud-init-update` | Updates cloud init for a workflow id config architecture. |
| `--ubuntu-tools-build` | Builds ubuntu tools for chroot environment. |
| `--ubuntu-tools-test` | Tests ubuntu tools in chroot environment. |
| `--rocky-tools-build` | Builds rocky linux tools for chroot environment. |
| `--rocky-tools-test` | Tests rocky linux tools in chroot environment. |
| `--bootcmd <bootcmd-list>` | Comma-separated list of boot commands to execute. |
| `--runcmd <runcmd-list>` | Comma-separated list of run commands to execute. |
| `--logs <log-id>` | Displays logs for log id: dhcp,dhcp-lease,dhcp-lan,cloud-init,cloud-init-machine,cloud-init-config |
| `--dev` | Sets the development context environment for baremetal operations. |
| `--ls` | Lists available boot resources and machines. |
| `--resume-infra-setup` | Skip commissioning, OS install, and all bootstrapping; resume only the SSH-based infra setup (kubeadm join/init) on a node that already has the OS installed and is reachable via SSH. |
| `--resume-join` | Skip everything except the kubeadm join command. Assumes engine, Node.js, CRI-O, kubelet, and kubeadm are already installed. Only retrieves a fresh join token from the control-plane and runs kubeadm join. |
| `-h, --help` | display help for command |

---

## underpost package

Generates the package manifests a deploy id owns, from the engine manifest and the deploy's product catalog, and installs the dependencies that catalog pins.

**Usage:** `underpost package [options] [deploy-id]`

### Arguments

| Argument | Description |
| --- | --- |
| `deploy-id` | Deploy id, or a comma-separated list, to act on. Defaults to every deploy id in the private configuration tree. |

### Options

| Option | Description |
| --- | --- |
| `--sync` | Regenerates each deploy manifest from the engine manifest and the deploy catalog (default). |
| `--install` | Installs the dependencies the deploy catalog pins into this checkout. |
| `--rename <name>` | Renames this checkout's package, in its manifest and its lockfile. |
| `--set-repo <owner/repo>` | Points this checkout's package at a repository. |
| `--dry-run` | For --sync: resolves the manifests without writing them. |
| `-h, --help` | display help for command |

---

## underpost socketsecurity

Security audit through the Socket.dev free plan: dependency security (advisories, supply chain alerts, free security patches in .socket/manifest.json) and source code risk (alerts on this project's own code).

**Usage:** `underpost socketsecurity [options]`

### Options

| Option | Description |
| --- | --- |
| `--audit` | Audits the checkout (default). Dependency security: segregation, npm audit, the Socket patch scan and, with SOCKET_CLI_API_TOKEN set, the Socket full scan of the dependency manifests. Source code risk: with SOCKET_CLI_API_TOKEN set, the alerts Socket's registry analysis raises on this project's own published package, as refactoring tasks. Writes the JSON and Markdown reports. |
| `--ci` | Audits, then exits non-zero when the Socket scan fails or violates the organization policy, or a finding the policy does not ignore or monitor remains at --fail-on. |
| `--fail-on <severity>` | Severity --ci fails at. One of: critical, high, moderate, low, info. Defaults to high. |
| `--fix` | Runs the remediation pass before the audit: npm audit fix, every available free Socket patch, socket patch apply. |
| `--patch-scan` | Lists the free Socket patches available for the installed packages. |
| `--patch-get <identifier>` | Downloads one patch (UUID, CVE, GHSA or PURL) into .socket/manifest.json and applies it. |
| `--patch-apply` | Applies the patch manifest; the prepare hook. A host without the Socket CLI skips it. |
| `--patch-setup` | Installs the prepare hook in package.json. |
| `--out <dir>` | Report directory (default: security-reports). |
| `--dry-run` | Previews --patch-setup; verifies --patch-apply without writing. |
| `-h, --help` | display help for command |

---

## underpost graphify

Builds the code graph of this checkout with the pinned Graphify release, code only. It commits GRAPH_REPORT.md and its stamp in docs/graphify-out.

**Usage:** `underpost graphify [options]`

### Options

| Option | Description |
| --- | --- |
| `--check` | Checks the code graph against the work tree, without Graphify and without a write; fails when it is stale. |
| `--revision <revision>` | Checks the code graph that this commit holds, instead of the work tree. |
| `-h, --help` | display help for command |

---

## underpost release

Release orchestrator for building new versions and deploying releases of the Underpost CLI.

**Usage:** `underpost release [options] [version]`

### Arguments

| Argument | Description |
| --- | --- |
| `version` | The new version string to set (e.g., "3.1.4"). Defaults to current version. |

### Options

| Option | Description |
| --- | --- |
| `--build` | Builds a new version: tests template, bumps versions, rebuilds manifests and configs. |
| `--deploy` | Deploys the release: syncs secrets, commits, and pushes to remote repositories. |
| `--ci-push <deploy-id>` | Local equivalent of engine-*.ci.yml: builds dd-{deploy-id} and pushes to the engine-{deploy-id} repository. Accepts the suffix (e.g., "cyberia"), "dd-cyberia", or "engine-cyberia". |
| `--message <message>` | Commit message for --ci-push or --pwa-build (defaults to last commit of the engine repository). |
| `--pwa-build` | Runs the pwa-microservices-template update flow: always re-clones, syncs engine sources, installs, builds, and pushes. |
| `--dry-run` | For --build: previews version-bump changes (per-file substitution counts) without writing files or running downstream commands. |
| `--mongo-host <host>` | For --build: override DB_HOST in the template .env.example for the smoke test (e.g., "192.168.1.82:27017"). |
| `--mongo-user <user>` | For --build: override DB_USER in the template .env.example for the smoke test. |
| `--mongo-password <password>` | For --build: override DB_PASSWORD in the template .env.example for the smoke test. |
| `--valkey-host <host>` | For --build: override VALKEY_HOST in the template .env.example for the smoke test (e.g., "192.168.1.82"). |
| `--no-graphify` | For --build: builds no code graph (see `underpost graphify`). |
| `--cli-docs` | Regenerates CLI-HELP.md, the served CLI reference and the README command index from the command definitions. |
| `--changelog` | Writes CHANGELOG.md from the tagged commits ("[scope] subject"): the changes since the last release, then the five latest releases. |
| `--changelog-min-version <version>` | For --changelog: the oldest release section (default: 2.97.1). |
| `--change-summary` | Prints the change summary the CHANGE_SUMMARY environment variable carries (a dispatch input, or a commit message with its Change-Summary trailer), else the one of the latest commits. |
| `--from-n-commit <n>` | For --change-summary: how many latest commits a new summary covers (default: 1). |
| `--fallback <message>` | For --change-summary: the only entry of the summary when none is received and the latest commits hold none. |
| `--format <format>` | For --change-summary: json (to forward), message (to commit: one line per entry, then the trailer) or markdown. (default: "json") |
| `-h, --help` | display help for command |

---

## underpost source-release

Source channels, the Release Job and the release store.

**Usage:** `underpost source-release [options] <operation> <subject>`

### Arguments

| Argument | Description |
| --- | --- |
| `operation` | repository: the repository of a source channel; job: run a Release Job; prune: remove the release workspaces of the store. |
| `subject` | The public repository (repository), the release id (job), or the release to keep (prune). |

### Options

| Option | Description |
| --- | --- |
| `--channel <channel>` | For repository: the source channel, public or private. (default: "public") |
| `--deploy-id <deploy-id>` | For job: the deployment the release belongs to. |
| `--image <image>` | For job: the container image the Job runs. |
| `--cmd <command>` | For job: the shell command line the Job runs. |
| `--env <env>` | For job: the deployment environment. (default: "production") |
| `--scope <scope>` | For job: the configuration scope whose `app apply` Secret the Job reads, e.g. data-release. |
| `--set-env <list>` | For job: plain environment values, as KEY=value,KEY=value. |
| `--node-name <node-name>` | For job: pins the Job to the node that holds the release store. |
| `--namespace <namespace>` | For job: the namespace of the Job; without it, conf.cluster.json places release Jobs. |
| `--store <path>` | For job and prune: the release store path on the node. |
| `--timeout <seconds>` | For job: the deadline of the Job, in seconds. (default: "3600") |
| `--image-pull-policy <policy>` | For job: Always, IfNotPresent or Never. (default: "IfNotPresent") |
| `--dry-run` | For job: print the Job manifest and run nothing. |
| `-h, --help` | display help for command |

---
