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-x86_64-unknown-linux-gnu
  • Windows: cb-x86_64-pc-windows-msvc.exe
  • Apple Intel: cb-x86_64-apple-darwin
  • Apple M-series: cb-aarch64-apple-darwin

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

$ curl -fsSL https://canarybit-public-binaries.s3.eu-west-1.amazonaws.com/cb-cli/0.2.6/cb-x86_64-unknown-linux-gnu -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 cbclient agent, Tower Premium and more.

List
$ cb list cbclient
Download
$ cb download cbclient 0.2.6/cbclient

Current Version

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

cb --version

Help

Print the help of the given subcommand(s).

$ cb --help

Data collection

CanaryBit CLI does not store any sort of data.