Brig
The command line interface for interacting with Brigade
The brig
CLI provides access to the full repertoire of supported user
interactions in Brigade, whether it’s logging into Brigade with brig login
,
bootstrapping a new Brigade project with brig init
, creating events with
brig event create
– the list goes on.
In this doc, we’ll go over how to install brig and then give a brief overview of the suite of commands that brig provides.
Install Brig
Brig can be installed via a few methods. Below we demonstrate how to install via the GoFish package manager and via the GitHub releases page.
You can also build brig from source; see the Developers guide for more info.
GoFish
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
GitHub Releases
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.
linux
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
macos
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
windows
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.
$env:PATH+=";$env:USERPROFILE\bin"
Suite of Commands
To view the full suite of commands that brig supports, simply type brig
in
your console. You should see the commands available under COMMANDS
. These
include:
event
: Create and manage Brigade Eventsinit
: Bootstrap a new Brigade Projectlogin
: Log in to Brigadelogout
: Log out of Brigadeproject
: Create and manage Brigade Projectsrole
: Grant, revoke and list system roles for users or service accountsservice-account
: Create and manage service accountsusers
: 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)