The command line interface for interacting with Brigade
brig CLI provides access to the full repertoire of supported user
interactions in Brigade, whether it’s logging into Brigade with
bootstrapping a new Brigade project with
brig init, creating events with
brig event create – the list goes on.
You can also build brig from source; see the Developers guide for more info.
GoFish is a handy cross-platform package manager supporting all three major operating systems (Windows, MacOS and Linux). Assuming GoFish is installed and initialized locally, we can use it to install the brig CLI. Here’s an example on a MacOS or Linux machine:
gofish install brig@2 gofish link brig@2
To install brig via Brigade’s GitHub releases page, copy the appropriate binary into a directory on your machine that is included in your PATH environment variable.
curl -Lo /usr/local/bin/brig https://github.com/brigadecore/brigade/releases/download/v2.0.0-rc.1/brig-linux-amd64 chmod +x /usr/local/bin/brig
curl -Lo /usr/local/bin/brig https://github.com/brigadecore/brigade/releases/download/v2.0.0-rc.1/brig-darwin-amd64 chmod +x /usr/local/bin/brig
mkdir -force $env:USERPROFILE\bin (New-Object Net.WebClient).DownloadFile("https://github.com/brigadecore/brigade/releases/download/v2.0.0-rc.1/brig-windows-amd64.exe", "$ENV:USERPROFILE\bin\brig.exe") $env:PATH+=";$env:USERPROFILE\bin"
The script above downloads brig.exe and adds it to your PATH for the current session. Add the following line to your PowerShell Profile to make the change permanent.
Suite of Commands
To view the full suite of commands that brig supports, simply type
your console. You should see the commands available under
event: Create and manage Brigade Events
init: Bootstrap a new Brigade Project
login: Log in to Brigade
logout: Log out of Brigade
project: Create and manage Brigade Projects
role: Grant, revoke and list system roles for users or service accounts
service-account: Create and manage service accounts
users: Manage authenticated users
Type any of these commands to get a help menu and start digging deeper into the full selection of functionality that each provides. For example:
$ brig event NAME: Brigade event - Manage events USAGE: Brigade event command [command options] [arguments...] COMMANDS: cancel Cancel a single event without deleting it cancel-many, cm Cancel multiple events without deleting them clone Clone an existing event create Create a new event delete Delete a single event delete-many, dm Delete multiple events get Retrieve an event list, ls List events retry Retry an event log, logs View worker or job logs help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help (default: false) --version, -v print the version (default: false)