circle-cli icon indicating copy to clipboard operation
circle-cli copied to clipboard

A CLI for interacting with CircleCI

circle-cli

These are a set of tools for interacting with CircleCI.

Installation

$ brew install keith/formulae/circle-cli

Authentication

Add a Circle API token to your ~/.netrc file. The format looks like this:

machine circleci.com
  password YOUR_TOKEN

Usage

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.

artifacts

Download the artifacts from a specific build number:

$ circle artifacts --repo keith/circle-cli --number 42

builds

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

Cancel a specific build (--repo can be omitted if your current directory has remote set):

$ circle cancel --number 42

cancel-all

Cancel all builds on the project:

$ circle cancel-all

Cancel all builds for a specific branch:

$ circle cancel-all -b master

clear-cache

Clear your project's build cache:

$ circle clear-cache -r keith/circle-cli

open

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

rebuild

Restart a circle build:

$ circle rebuild --number 42

Restart a build without cache:

$ circle rebuild --repo keith/circle-cli --number 42 --no-cache

watch

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

whoami

Get current info about your logged in user:

$ circle whoami