Private Beta
.md

BountyHub Docs

BH CLI Commands

List of available BH CLI commands

#Command-Line Help for bh

This document contains the help content for the bh command-line program.

Generated by scripts/gen-bh-docs.py from bh --help. Do not hand-edit.

Command Overview:

#bh

BountyHub CLI

Usage: bh [FLAGS] <SUBCOMMAND>

#Subcommands:

  • account — Account info and entitlements
  • artifact — Workflow run artifacts
  • blob — Blob storage
  • dataset — Project datasets
  • module — Reusable workflow modules
  • pat — Personal access tokens
  • project — Projects
  • runner — Runners
  • scan — Workflow scans and runs
  • workflow — Workflows

#Options:

  • --hub-url <URL> — Hub base URL (defaults to BOUNTYHUB_URL, then https://api.bountyhub.com)
  • --token <TOKEN> — Personal access token (defaults to BOUNTYHUB_TOKEN)
  • --json — Print machine-readable JSON

#bh account

Account info and entitlements

Usage: bh account <SUBCOMMAND>

#Subcommands:

  • entitlement — Entitlement commands
  • get — Show the authenticated account

#bh account entitlement

Entitlement commands

Usage: bh account entitlement <SUBCOMMAND>

#Subcommands:

  • list — List entitlements with current usage

#bh account entitlement list

List entitlements with current usage

Usage: bh account entitlement list

#bh account get

Show the authenticated account

Usage: bh account get

#bh artifact

Workflow run artifacts

Usage: bh artifact <SUBCOMMAND>

#Subcommands:

  • delete — Delete an artifact
  • download — Download an artifact
  • list — List the artifacts of a run

#bh artifact delete

Delete an artifact

Usage: bh artifact delete [FLAGS]

#Options:

  • --id <ID> — Artifact id
  • --run-id <ID> — Run id (with --name)
  • --name <NAME> — Artifact name (with --run-id)

#bh artifact download

Download an artifact

Usage: bh artifact download [FLAGS]

#Options:

  • --id <ID> — Artifact id
  • --run-id <ID> — Run id (with --name)
  • --name <NAME> — Artifact name (with --run-id)
  • -o, --output <PATH> — Write here instead of the artifact's file name

#bh artifact list

List the artifacts of a run

Usage: bh artifact list <--run-id <ID>>

#Options:

  • --run-id <ID> — Run id

#bh blob

Blob storage

Usage: bh blob <SUBCOMMAND>

#Subcommands:

  • download — Download a blob
  • ls — List directories under a path
  • mkdir — Create a directory
  • rm — Delete a file
  • rmdir — Delete a directory
  • upload — Upload a file to blob storage

#bh blob download

Download a blob

Usage: bh blob download <-s --src <PATH>> [-d --dst <PATH>]

#Options:

  • -s, --src <PATH> — Blob path
  • -d, --dst <PATH> — Write here instead of the blob's base name

#bh blob ls

List directories under a path

Usage: bh blob ls [-p --path <PATH>]

#Options:

  • -p, --path <PATH> — Directory path (default: )

#bh blob mkdir

Create a directory

Usage: bh blob mkdir <-p --path <PATH>>

#Options:

  • -p, --path <PATH> — Blob path

#bh blob rm

Delete a file

Usage: bh blob rm <-p --path <PATH>>

#Options:

  • -p, --path <PATH> — Blob path

#bh blob rmdir

Delete a directory

Usage: bh blob rmdir <-p --path <PATH>>

#Options:

  • -p, --path <PATH> — Blob path

#bh blob upload

Upload a file to blob storage

Usage: bh blob upload <-s --src <PATH>> <--dst <PATH>>

#Options:

  • -s, --src <PATH> — Local file to upload
  • --dst <PATH> — Destination blob path

#bh dataset

Project datasets

Usage: bh dataset <SUBCOMMAND>

#Subcommands:

  • create — Create a dataset
  • delete — Delete a dataset
  • describe — Describe a dataset's columns
  • get — Get a dataset by id
  • list — List datasets in a project
  • query — Run a read-only SQL query against a dataset
  • update — Update a dataset's name or description

#bh dataset create

Create a dataset

Usage: bh dataset create <FLAGS> <NAME>

#Arguments:

  • <NAME> — Dataset name

#Options:

  • --project-id <ID> — Project id
  • --description <TEXT> — Dataset description
  • --schema-json <PATH> — Path to a JSON-encoded dataset schema

#bh dataset delete

Delete a dataset

Usage: bh dataset delete <--dataset-id <ID>>

#Options:

  • --dataset-id <ID> — Dataset id

#bh dataset describe

Describe a dataset's columns

Usage: bh dataset describe <--dataset-id <ID>>

#Options:

  • --dataset-id <ID> — Dataset id

#bh dataset get

Get a dataset by id

Usage: bh dataset get <--dataset-id <ID>>

#Options:

  • --dataset-id <ID> — Dataset id

#bh dataset list

List datasets in a project

Usage: bh dataset list <FLAGS>

#Options:

  • --project-id <ID> — Project id
  • --page-size <N> — Maximum number of datasets per page
  • --page-token <TOKEN> — Pagination token
  • --all — Follow pagination

#bh dataset query

Run a read-only SQL query against a dataset

Usage: bh dataset query <FLAGS>

#Options:

  • --dataset-id <ID> — Dataset id
  • --sql <SQL> — Read-only SQL query
  • --page-size <N> — Maximum rows per page
  • --include-history — Query the raw append-only history instead of the current state

#bh dataset update

Update a dataset's name or description

Usage: bh dataset update <FLAGS>

#Options:

  • --dataset-id <ID> — Dataset id
  • --name <NAME> — New name
  • --description <TEXT> — New description

#bh module

Reusable workflow modules

Usage: bh module <SUBCOMMAND>

#Subcommands:

  • count — Print the module count
  • create — Create a module
  • delete — Delete a module
  • fork — Fork a module into your account
  • get — Get a module by id or name
  • get-spec — Print a module's .bhw spec
  • list — List workflow modules
  • submit — Submit a draft module
  • update — Update a module (creates a new version)

#bh module count

Print the module count

Usage: bh module count

#bh module create

Create a module

Usage: bh module create <FLAGS> <NAME>

#Arguments:

  • <NAME> — Module name

#Options:

  • --description <TEXT> — Module description
  • --spec <PATH> — Path to the module .bhw spec
  • --draft — Create as a draft

#bh module delete

Delete a module

Usage: bh module delete <--id <ID>>

#Options:

  • --id <ID> — Module id

#bh module fork

Fork a module into your account

Usage: bh module fork <--id <ID>>

#Options:

  • --id <ID> — Module id

#bh module get

Get a module by id or name

Usage: bh module get [--id <ID>] [--name <NAME>]

#Options:

  • --id <ID> — Module id
  • --name <NAME> — Module name

#bh module get-spec

Print a module's .bhw spec

Usage: bh module get-spec <--id <ID>> [-o --output <PATH>]

#Options:

  • --id <ID> — Module id
  • -o, --output <PATH> — Write the spec here instead of printing it

#bh module list

List workflow modules

Usage: bh module list [FLAGS]

#Options:

  • --page-size <N> — Maximum number of modules per page
  • --page-token <TOKEN> — Pagination token
  • --all — Follow pagination

#bh module submit

Submit a draft module

Usage: bh module submit <--id <ID>>

#Options:

  • --id <ID> — Module id

#bh module update

Update a module (creates a new version)

Usage: bh module update <FLAGS>

#Options:

  • --id <ID> — Module id
  • --name <NAME> — New name
  • --description <TEXT> — New description
  • --spec <PATH> — Path to the new .bhw spec

#bh pat

Personal access tokens

Usage: bh pat <SUBCOMMAND>

#Subcommands:

  • create — Create a token and print its value
  • delete — Delete a token
  • get — Get a token's metadata
  • list — List personal access tokens
  • rotate — Rotate a token and print the new value

#bh pat create

Create a token and print its value

Usage: bh pat create [--scope <SCOPE>] [--expires-in-days <DAYS>] <NAME>

#Arguments:

  • <NAME> — Token name

#Options:

  • --scope <SCOPE> — Scope name such as project-ro or workflow-rw (repeatable)
  • --expires-in-days <DAYS> — Expire the token this many days from now

#bh pat delete

Delete a token

Usage: bh pat delete <--id <ID>>

#Options:

  • --id <ID> — Token id

#bh pat get

Get a token's metadata

Usage: bh pat get <--id <ID>>

#Options:

  • --id <ID> — Token id

#bh pat list

List personal access tokens

Usage: bh pat list [--page-size <N>] [--page-token <TOKEN>]

#Options:

  • --page-size <N> — Maximum number of tokens per page
  • --page-token <TOKEN> — Pagination token

#bh pat rotate

Rotate a token and print the new value

Usage: bh pat rotate <--id <ID>>

#Options:

  • --id <ID> — Token id

#bh project

Projects

Usage: bh project <SUBCOMMAND>

#Subcommands:

  • activate — Activate a project
  • count — Print the project count
  • create — Create a project
  • deactivate — Deactivate a project
  • delete — Delete a project
  • get — Get a project by id or name
  • list — List projects
  • update — Update a project

#bh project activate

Activate a project

Usage: bh project activate <--id <ID>>

#Options:

  • --id <ID> — Project id

#bh project count

Print the project count

Usage: bh project count

#bh project create

Create a project

Usage: bh project create [--description <TEXT>] <NAME>

#Arguments:

  • <NAME> — Project name

#Options:

  • --description <TEXT> — Project description

#bh project deactivate

Deactivate a project

Usage: bh project deactivate <--id <ID>>

#Options:

  • --id <ID> — Project id

#bh project delete

Delete a project

Usage: bh project delete <--id <ID>>

#Options:

  • --id <ID> — Project id

#bh project get

Get a project by id or name

Usage: bh project get [--id <ID>] [--name <NAME>]

#Options:

  • --id <ID> — Project id
  • --name <NAME> — Project name

#bh project list

List projects

Usage: bh project list [FLAGS]

#Options:

  • --page-size <N> — Maximum number of projects to return per page
  • --page-token <TOKEN> — Pagination token from a previous response
  • --all — Follow pagination until every project is listed

#bh project update

Update a project

Usage: bh project update <FLAGS>

#Options:

  • --id <ID> — Project id
  • --name <NAME> — New name
  • --description <TEXT> — New description

#bh runner

Runners

Usage: bh runner <SUBCOMMAND>

#Subcommands:

  • delete — Delete a runner
  • list — List runners
  • registration — Runner registration commands
  • release — Runner release commands

#bh runner delete

Delete a runner

Usage: bh runner delete <--id <ID>>

#Options:

  • --id <ID> — Runner id

#bh runner list

List runners

Usage: bh runner list [FLAGS]

#Options:

  • --page-size <N> — Maximum number of runners per page
  • --page-token <TOKEN> — Pagination token
  • --all — Follow pagination

#bh runner registration

Runner registration commands

Usage: bh runner registration <SUBCOMMAND>

#Subcommands:

  • command — Create a registration and print the runner register command
  • token — Create a registration and print its token and URL

#bh runner registration command

Create a registration and print the runner register command

Usage: bh runner registration command

#bh runner registration token

Create a registration and print its token and URL

Usage: bh runner registration token

#bh runner release

Runner release commands

Usage: bh runner release <SUBCOMMAND>

#Subcommands:

  • latest — Print the latest runner release
  • list — List runner releases

#bh runner release latest

Print the latest runner release

Usage: bh runner release latest

#bh runner release list

List runner releases

Usage: bh runner release list [--page-size <N>] [--page-token <TOKEN>]

#Options:

  • --page-size <N> — Maximum number of releases per page
  • --page-token <TOKEN> — Pagination token

#bh scan

Workflow scans and runs

Usage: bh scan <SUBCOMMAND>

#Subcommands:

  • dispatch — Dispatch a scan run
  • run — Scan run commands

#bh scan dispatch

Dispatch a scan run

Usage: bh scan dispatch <FLAGS>

#Options:

  • --scan-id <ID> — Scan id (<revision-id>:<activity-name>)
  • --input-string <KEY=VALUE> — String input as key=value (repeatable)
  • --input-bool <KEY=BOOL> — Boolean input as key=true|false (repeatable)

#bh scan run

Scan run commands

Usage: bh scan run <SUBCOMMAND>

#Subcommands:

  • cancel — Cancel a running run
  • delete — Delete one or more finished runs
  • events — List a run's events
  • get — Get a run
  • list — List runs of a scan or revision
  • logs — Print a run's logs

#bh scan run cancel

Cancel a running run

Usage: bh scan run cancel <--id <ID>>

#Options:

  • --id <ID> — Run id

#bh scan run delete

Delete one or more finished runs

Usage: bh scan run delete [IDS]…

#bh scan run events

List a run's events

Usage: bh scan run events <FLAGS>

#Options:

  • --id <ID> — Run id
  • --step-id <N> — Only events from this step id
  • --page-size <N> — Maximum number of events per page

#bh scan run get

Get a run

Usage: bh scan run get <--id <ID>>

#Options:

  • --id <ID> — Run id

#bh scan run list

List runs of a scan or revision

Usage: bh scan run list [FLAGS]

#Options:

  • --scan-id <ID> — Scan id
  • --revision-id <ID> — Revision id (lists runs across all of the revision's scans)
  • --page-size <N> — Maximum number of runs per page
  • --page-token <TOKEN> — Pagination token
  • --all — Follow pagination

#bh scan run logs

Print a run's logs

Usage: bh scan run logs <--id <ID>> [-o --output <PATH>]

#Options:

  • --id <ID> — Run id
  • -o, --output <PATH> — Write the logs here instead of printing them

#bh workflow

Workflows

Usage: bh workflow <SUBCOMMAND>

#Subcommands:

  • activate — Activate a workflow
  • count — Print the workflow count for a project
  • create — Create a workflow (and its first revision)
  • deactivate — Deactivate a workflow
  • delete — Delete a workflow
  • get — Get a workflow by id or by project + workflow name
  • list — List workflows in a project
  • revision — Workflow revision commands
  • scans — List scans of a revision
  • update — Update a workflow's name or description

#bh workflow activate

Activate a workflow

Usage: bh workflow activate <--id <ID>>

#Options:

  • --id <ID> — Workflow id

#bh workflow count

Print the workflow count for a project

Usage: bh workflow count <--project-id <ID>>

#Options:

  • --project-id <ID> — Project id

#bh workflow create

Create a workflow (and its first revision)

Usage: bh workflow create <FLAGS> <NAME>

#Arguments:

  • <NAME> — Workflow name

#Options:

  • --project-id <ID> — Project id
  • --description <TEXT> — Workflow description
  • --comment <TEXT> — Revision comment
  • --spec <PATH> — Path to the initial .bhw spec
  • --revision-name <NAME> — Revision name

#bh workflow deactivate

Deactivate a workflow

Usage: bh workflow deactivate <--id <ID>>

#Options:

  • --id <ID> — Workflow id

#bh workflow delete

Delete a workflow

Usage: bh workflow delete <--id <ID>>

#Options:

  • --id <ID> — Workflow id

#bh workflow get

Get a workflow by id or by project + workflow name

Usage: bh workflow get [FLAGS]

#Options:

  • --id <ID> — Workflow id
  • --project-name <NAME> — Project name (with --workflow-name)
  • --workflow-name <NAME> — Workflow name (with --project-name)

#bh workflow list

List workflows in a project

Usage: bh workflow list <FLAGS>

#Options:

  • --project-id <ID> — Project id
  • --page-size <N> — Maximum number of workflows per page
  • --page-token <TOKEN> — Pagination token
  • --all — Follow pagination

#bh workflow revision

Workflow revision commands

Usage: bh workflow revision <SUBCOMMAND>

#Subcommands:

  • create — Create a new revision
  • delete — Delete a revision
  • get — Print a revision's .bhw spec
  • list — List a workflow's revisions
  • submit — Submit a revision

#bh workflow revision create

Create a new revision

Usage: bh workflow revision create <FLAGS>

#Options:

  • --workflow-id <ID> — Workflow id
  • --spec <PATH> — Path to the .bhw spec
  • --comment <TEXT> — Revision comment
  • --name <NAME> — Revision name

#bh workflow revision delete

Delete a revision

Usage: bh workflow revision delete <--revision-id <ID>>

#Options:

  • --revision-id <ID> — Revision id

#bh workflow revision get

Print a revision's .bhw spec

Usage: bh workflow revision get <--revision-id <ID>> [-o --output <PATH>]

#Options:

  • --revision-id <ID> — Revision id
  • -o, --output <PATH> — Write the spec here instead of printing it

#bh workflow revision list

List a workflow's revisions

Usage: bh workflow revision list <FLAGS>

#Options:

  • --workflow-id <ID> — Workflow id
  • --page-size <N> — Maximum number of revisions per page
  • --page-token <TOKEN> — Pagination token
  • --all — Follow pagination

#bh workflow revision submit

Submit a revision

Usage: bh workflow revision submit <--revision-id <ID>>

#Options:

  • --revision-id <ID> — Revision id

#bh workflow scans

List scans of a revision

Usage: bh workflow scans <--revision-id <ID>>

#Options:

  • --revision-id <ID> — Revision id

#bh workflow update

Update a workflow's name or description

Usage: bh workflow update <FLAGS>

#Options:

  • --id <ID> — Workflow id
  • --name <NAME> — New name
  • --description <TEXT> — New description