You are viewing docs for Brigade v2. Click here for v1 docs.

Brigade Docs

The brig CLI

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

In general, brig can be installed by downloading the appropriate pre-built binary from our releases page to a directory on your machine that is included in your PATH environment variable. On some systems, it is even easier than this.

You can also build brig from source; see the Developers guide for more info.

linux

curl -Lo /usr/local/bin/brig https://github.com/brigadecore/brigade/releases/download/v2.6.0/brig-linux-amd64
chmod +x /usr/local/bin/brig

macos

The popular Homebrew package manager provides the most convenient method of installing the Brigade CLI on a Mac:

$ brew install brigade-cli

Alternatively, you can install manually by directly downloading a pre-built binary:

$ curl -Lo /usr/local/bin/brig https://github.com/brigadecore/brigade/releases/download/v2.6.0/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.6.0/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 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)