key, workflow-state & update
Virtual-key signing for access control, benchmark trace utilities, and the self-updater.
bitrouter key
Virtual-key management
Usage: bitrouter key [OPTIONS] <COMMAND>
Options
| Flag | Description |
|---|---|
-j, --json | Force JSON output (the default; agent-native). Conflicts with --human |
--human | Render the human-readable view to stdout instead of JSON |
bitrouter key sign
Mint a new brvk_ virtual key for a user. v1 does not sign a JWT — it creates a DB-backed virtual key and prints the plaintext once
Usage: bitrouter key sign [OPTIONS] --user <USER>
Options
| Flag | Description |
|---|---|
-j, --json | Force JSON output (the default; agent-native). Conflicts with --human |
-u, --user <USER> | The owning user id |
-d, --db <DB> | Database URL — any backend sea-orm supports (sqlite://…, postgres://…, mysql://…) [default: sqlite://./bitrouter.db] |
--human | Render the human-readable view to stdout instead of JSON |
--policy <POLICY> | Optional policy id to bind to the key (the policy_id column) |
Mints a virtual key bound to an access-control policy — the per-key guardrails surface (allowed models, budgets, rate limits), distinct from routing policies. See Guardrails.
bitrouter key sign --user ci --policy nightly-capbitrouter workflow-state
Workflow-state trace/replay utilities
Usage: bitrouter workflow-state [OPTIONS] <COMMAND>
Options
| Flag | Description |
|---|---|
-j, --json | Force JSON output (the default; agent-native). Conflicts with --human |
--human | Render the human-readable view to stdout instead of JSON |
Internal benchmark tooling — the plumbing behind the published Terminal-Bench reports (trace capture, outcome bundling, reward feedback), not a production user surface. It's documented here only for completeness; you almost certainly don't need it.
bitrouter workflow-state harbor-outcomes
Convert a Harbor run directory into benchmark outcome JSONL
Usage: bitrouter workflow-state harbor-outcomes [OPTIONS] --harbor-run-dir <HARBOR_RUN_DIR> --output <OUTPUT>
Options
| Flag | Description |
|---|---|
--harbor-run-dir <HARBOR_RUN_DIR> | Harbor group run directory containing per-trial result.json files |
-j, --json | Force JSON output (the default; agent-native). Conflicts with --human |
--human | Render the human-readable view to stdout instead of JSON |
--output <OUTPUT> | Output benchmark outcome JSONL path |
bitrouter workflow-state bundle
Build a deterministic benchmark trace bundle
Usage: bitrouter workflow-state bundle [OPTIONS] --run-label <RUN_LABEL> --traces <TRACES> --cloud-usage <CLOUD_USAGE> --outcomes <OUTCOMES> --output-dir <OUTPUT_DIR>
Options
| Flag | Description |
|---|---|
-j, --json | Force JSON output (the default; agent-native). Conflicts with --human |
--run-label <RUN_LABEL> | Run label stored in run-artifact.json |
--human | Render the human-readable view to stdout instead of JSON |
--traces <TRACES> | Daemon workflow trace JSONL |
--cloud-usage <CLOUD_USAGE> | BitRouter Cloud usage snapshot JSONL |
--outcomes <OUTCOMES> | Benchmark outcome JSONL |
--policy-decisions <POLICY_DECISIONS> | Optional policy routing decision JSONL from BITROUTER_POLICY_DECISION_JSONL |
--output-dir <OUTPUT_DIR> | Output directory for traces/cloud usage/outcomes/artifacts |
bitrouter workflow-state metering-usage
Export daemon metering rows as usage JSONL for benchmark bundles
Usage: bitrouter workflow-state metering-usage [OPTIONS] --database-url <DATABASE_URL> --output <OUTPUT>
Options
| Flag | Description |
|---|---|
--database-url <DATABASE_URL> | Database URL for the daemon metering DB, for example sqlite:///path/bitrouter.db |
-j, --json | Force JSON output (the default; agent-native). Conflicts with --human |
--human | Render the human-readable view to stdout instead of JSON |
--output <OUTPUT> | Output usage JSONL path |
--impute-price <IMPUTE_PRICES> | Impute zero/missing charges as provider:model=input_micro_usd,output_micro_usd |
--since <SINCE> | Inclusive RFC3339 lower bound. Defaults to the current UTC month |
--until <UNTIL> | Exclusive RFC3339 upper bound. Only used with --since; defaults to now |
bitrouter workflow-state apply-reward-feedback
Apply task rewards to cheap replacement transitions before the next round
Usage: bitrouter workflow-state apply-reward-feedback [OPTIONS] --database-url <DATABASE_URL> --traces <TRACES> --outcomes <OUTCOMES> --policy-decisions <POLICY_DECISIONS>
Options
| Flag | Description |
|---|---|
--database-url <DATABASE_URL> | Database URL for the policy daemon DB, for example sqlite:///path/bitrouter.db |
-j, --json | Force JSON output (the default; agent-native). Conflicts with --human |
--human | Render the human-readable view to stdout instead of JSON |
--traces <TRACES> | Daemon workflow trace JSONL for the just-finished benchmark group |
--outcomes <OUTCOMES> | Benchmark outcome JSONL for the just-finished benchmark group |
--policy-decisions <POLICY_DECISIONS> | Policy routing decision JSONL from BITROUTER_POLICY_DECISION_JSONL |
bitrouter update
Update the installed bitrouter binary in place to the latest release. Follows prereleases by default while pre-1.0. For Homebrew / cargo install installs it prints the right upgrade command instead
Usage: bitrouter update [OPTIONS]
Options
| Flag | Description |
|---|---|
--check | Report whether a newer version exists, then exit without changing anything |
-j, --json | Force JSON output (the default; agent-native). Conflicts with --human |
--human | Render the human-readable view to stdout instead of JSON |
--tag <TAG> | Update (or downgrade) to a specific release tag, e.g. 1.0.0-alpha.18. Named --tag to avoid clashing with the global --version flag |
--stable | Only consider stable (non-prerelease) releases |
--restart | After a successful update, restart a running daemon so it serves the new binary |
-y, --yes | Skip the confirmation prompt |
bitrouter updateUpdates the installed binary in place to the latest release — follows prereleases by default while pre-1.0. Homebrew and cargo install builds update through their own package manager instead.
How is this guide?