Skip to content

CanaryBit Command-Line Interface (CLI)#️

Manage CanaryBit resources with interactive commands


The CanaryBit Command-Line Interface (CLI) is a cross-platform command-line tool to connect to your CanaryBit account and execute commands on CanaryBit resources.

Requirements#️

Install#️

List all available versions:

$ curl -s "https://canarybit-public-binaries.s3.amazonaws.com/?prefix=cb-cli/" | grep -oE '<Key>[^<]+</Key>' | sed -E 's/<\/?Key>//g' | awk -F'/' 'NF>2 {print $2}' | sort -u | awk '{printf "  📁  %s\n", $0}'

Download the binary from CanaryBit's S3 public bucket:

$ curl -fsSL https://canarybit-public-binaries.s3.eu-west-1.amazonaws.com/cb-cli/[VERSION]/[OS_TARGET] -o cb

where [VERSION] is the cb version and [OS_TARGET] is one of the following reference architectures:

  • Linux: cb-cli-linux-x64
  • Windows: cb-cli-windows-x64.exe
  • Apple Intel: cb-cli-macos-x64
  • Apple M-series: cb-cli-macos-arm64

Example

$ curl -s "https://canarybit-public-binaries.s3.amazonaws.com/?prefix=cb-cli/" | grep -oE '<Key>[^<]+</Key>' | sed -E 's/<\/?Key>//g' | awk -F'/' 'NF>2 {print $2}' | sort -u | awk '{printf "  📁  %s\n", $0}'
  📁  0.2.4
  📁  0.2.5
  📁  0.2.6
  📁  0.3.0

$ curl -fsSL https://canarybit-public-binaries.s3.eu-west-1.amazonaws.com/cb-cli/0.3.0/cb-cli-linux-x64 -o cb

Subcommands#️

Authentication#️

Authenticate towards CanaryBit Identity Provider and fetch a valid token for specific CanaryBit services.

Source your credentials (e.g. cb.rc):

cb.rc
export CB_USERNAME=***
export CB_PASSWORD=***

and run:

$ cb login

Account#️

Display your CanaryBit account information.

$ cb account

Assets#️

Get access to CanaryBit assets such as cb-inspector-client agent, Tower Premium and more.

List
$ cb list cb-inspector-client
Download
$ cb download cb-inspector-client
Download specific version
$ cb download cb-inspector-client --version 0.1.0

Current Version#️

For information about the current (latest) release, see the release notes. To find your installed version run:

cb --version

To update run the cb itself (may require sudo)

cb update

Help#️

Print the help of the given subcommand(s).

$ cb --help

Data collection#️

CanaryBit CLI does not store any sort of data.