CLI Reference¶
The benchdb binary is the supported command-line surface for writes,
interactive login, CI diagnostics, and trusted operations jobs. The CLI uses
Cobra, so every command supports --help:
This page is a map of the maintained command groups. The command-specific
--help output is the exact flag reference.
Result Commands¶
Submit one or more benchmark result JSON files:
Keep globs quoted:
The CLI expands globs internally, validates payloads, resolves credentials, and
submits multiple results with bounded concurrency. Each matched file may contain
one result object or an array of result objects. With exactly one result it
prints one compact JSON result identity. With multiple results it prints one
JSON line per result, including file, optional array index, and success or error
state. Use --jobs to tune concurrency for large benchmark suites.
Fetch one result as JSON:
Use Submitting Results for payload shape and migration examples.
Read And Compare Commands¶
Compare two benchmark results:
List benchmark series:
Export history CSV for one result's series:
Use Browsing And Comparing for the dashboard and API workflows these commands support.
CI Commands¶
Render a CI benchmark report:
Common selector forms:
benchdb ci report --server URL --repository REPO --commit SHA --run-ids RUN_IDS
benchdb ci report --server URL --run-ids CONTENDER_IDS --baseline-run-ids BASELINE_IDS
Publish repository-facing GitHub output from any CI runner:
benchdb ci report \
--server URL \
--repository REPO \
--commit SHA \
--github-check \
--github-pr-comment \
--github-pr-number PR_NUMBER \
--build-url BUILD_URL
--format json is the default. Use --format markdown --output
benchdb-report.md for CI step summaries. Report exit codes are:
| Exit code | Meaning |
|---|---|
0 |
success or skipped report |
1 |
failure or action_required report |
2 |
usage, authentication, server, transport, or decode error |
Use CI Reporting for the metadata contract, GitHub Actions fragment, GitHub App publishing, baseline modes, and status precedence.
Authentication Commands¶
Run browser loopback login and store a user-owned API token:
List and revoke API tokens:
For automation, prefer BENCHDB_TOKEN over --token so the token is not
placed on process arguments. Explicit --token remains available for local
overrides. Credential resolution is:
--tokenBENCHDB_TOKEN- the credentials file written by
benchdb auth login
Use Authentication And Tokens for browser sessions, server-minted reporter tokens, and the static operator token.
Operations Commands¶
Mint a reporter token from a server/admin environment:
Repair unknown commit rows after GitHub metadata becomes available:
Evaluate server-side alert rules:
Deliver queued alert events:
benchdb admin alerts deliver --channel webhook --format json
benchdb admin alerts deliver --channel slack --format json
benchdb admin alerts deliver --channel github-check --format json
benchdb admin alerts deliver --channel github-comment --format json
benchdb admin alerts deliver --channel email --format json
Use Operations and Alerting for the required environment variables and safety boundaries.
API And Server Commands¶
Emit the OpenAPI document:
Run the server and embedded Svelte dashboard:
Use API And SDK for generated clients and Operations for the runtime environment contract.