CLI Reference
Overview
The Bounda CLI is provided by two packages:
@bounda-dev/codegen— the CLI binary (bounda) withgenerateandcleancommands@bounda-dev/ops— ops commands (dlq,process-manager) registered at startup when the package is installed
Install both for full CLI functionality:
npm install -D @bounda-dev/codegen @bounda-dev/ops
If @bounda-dev/ops is not installed, the dlq and process-manager commands are unavailable. Running them prints an install hint.
All commands can be run with npx bounda or, if installed globally, just bounda.
bounda generate
Generate code and type definitions from your domain files.
npx bounda generate
npx bounda gen
| Option | Description |
|---|---|
-w, --watch | Watch for file changes and regenerate automatically |
-v, --verbose | Show verbose output during generation |
-r, --root <path> | Project root directory (default: current working directory) |
The gen alias is available for convenience. When used with --watch, the generator re-runs whenever domain files matching the configured patterns change.
bounda clean
Remove all generated code and type definitions.
npx bounda clean
| Option | Description |
|---|---|
-r, --root <path> | Project root directory (default: current working directory) |
This deletes the output directory (.bounda by default) and all generated +types directories.
Policy Dead Letter Queue
Failed policy executions are captured in a dead letter queue (DLQ) for inspection and replay. These commands manage the policy DLQ.
bounda dlq list
List failed policy executions.
npx bounda dlq list
npx bounda dlq list --policy sendConfirmation --since 2026-03-01
| Option | Description |
|---|---|
-p, --policy <name> | Filter by policy name |
-s, --since <date> | Show entries since date (ISO format) |
-e, --error-type <type> | Filter by error type (terminal, retriable_exhausted) |
--show-replayed | Include entries that have already been replayed |
-r, --root <path> | Project root directory |
bounda dlq show
Show details of a specific DLQ entry.
npx bounda dlq show <id>
Displays the full error, event payload, and metadata for the given DLQ entry.
bounda dlq replay
Replay a failed policy execution.
npx bounda dlq replay <id>
npx bounda dlq replay --policy sendConfirmation
| Option | Description |
|---|---|
-p, --policy <name> | Replay all failures for a specific policy |
-r, --root <path> | Project root directory |
When called with an id, replays that single entry. When called with --policy, replays all failed entries for the named policy.
bounda dlq delete
Delete a DLQ entry or entries matching a time filter.
npx bounda dlq delete <id>
npx bounda dlq delete --older-than 7d
| Option | Description |
|---|---|
--older-than <duration> | Delete entries older than the specified duration (e.g., 7d, 24h) |
-r, --root <path> | Project root directory |
bounda dlq cleanup
Clean up old succeeded policy execution records based on the configured executionsTTL.
npx bounda dlq cleanup
| Option | Description |
|---|---|
-r, --root <path> | Project root directory |
Records older than the TTL (default: 7 days) are removed.
Process Manager Commands
Inspect and manage process manager instances.
bounda process-manager list
List process manager instances.
npx bounda process-manager list
npx bounda process-manager list --status started --type onboarding
| Option | Description |
|---|---|
-t, --type <name> | Filter by process manager type |
-s, --status <status> | Filter by status (started, completed, failed, timed_out) |
-a, --aggregate <id> | Filter by aggregate ID |
-r, --root <path> | Project root directory |
bounda process-manager show
Show details of a specific process manager instance.
npx bounda process-manager show <id>
bounda process-manager history
Show execution history of a process manager instance.
npx bounda process-manager history <id>
npx bounda process-manager history <id> --limit 20
| Option | Description |
|---|---|
-l, --limit <number> | Maximum number of results (default: 50) |
-r, --root <path> | Project root directory |
Process Manager Dead Letter Queue
Failed process manager handler executions have their own DLQ, separate from the policy DLQ.
bounda process-manager dlq list
List failed process manager handlers.
npx bounda process-manager dlq list
npx bounda process-manager dlq list --type onboarding --error-type terminal
| Option | Description |
|---|---|
-t, --type <name> | Filter by process manager type |
-s, --since <date> | Show entries since date (ISO format) |
-e, --error-type <type> | Filter by error type (terminal, retriable_exhausted) |
--show-replayed | Include entries that have already been replayed |
-r, --root <path> | Project root directory |
bounda process-manager dlq show
Show details of a specific process manager DLQ entry.
npx bounda process-manager dlq show <id>
bounda process-manager dlq replay
Replay a failed process manager handler.
npx bounda process-manager dlq replay <id>
npx bounda process-manager dlq replay --type onboarding
| Option | Description |
|---|---|
-t, --type <name> | Replay all failures for a specific process manager type |
-r, --root <path> | Project root directory |
bounda process-manager dlq delete
Delete a process manager DLQ entry.
npx bounda process-manager dlq delete <id>
npx bounda process-manager dlq delete --older-than 7d
| Option | Description |
|---|---|
--older-than <duration> | Delete entries older than the specified duration (e.g., 7d, 24h) |
-r, --root <path> | Project root directory |
Related
- Configuration Reference — Config options that affect CLI behavior
- Policies — Understanding policy execution and retries
- Process Managers — Stateful workflow orchestration