These are a set of tools for interacting with CircleCI.
$ brew install keith/formulae/circle-cli
Add a Circle API token to your
~/.netrc
file. The format looks like this:
machine circleci.com
password YOUR_TOKEN
This repo has a collection of commands for different uses. Here's the
basic use of each of them. Use circle COMMAND --help
to see all
available options.
Download the artifacts from a specific build number:
$ circle artifacts --repo keith/circle-cli --number 42
List the builds for a repo:
$ circle builds --repo keith/circle-cli --all --count 5
Or for a specific branch:
$ circle builds --repo keith/circle-cli --branch master
Cancel a specific build (--repo
can be omitted if your current
directory has remote set):
$ circle cancel --number 42
Cancel all builds on the project:
$ circle cancel-all
Cancel all builds for a specific branch:
$ circle cancel-all -b master
Clear your project's build cache:
$ circle clear-cache -r keith/circle-cli
Open the Circle web interface for the project:
$ circle open
Or for a specific branch:
$ circle open master
Or a specific build:
$ circle open 42
Restart a circle build:
$ circle rebuild --number 42
Restart a build without cache:
$ circle rebuild --repo keith/circle-cli --number 42 --no-cache
Watch a running build a get notified of its output:
$ circle watch -n 42
Or for the newest build running on a branch:
$ circle watch -b master
Get current info about your logged in user:
$ circle whoami