• Stars
    star
    397
  • Rank 108,561 (Top 3 %)
  • Language
    Go
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Use CircleCI from the command line

circleci-cli

This is CircleCI's command-line application.

Documentation | Code of Conduct | Contribution Guidelines | Hacking

CircleCI GitHub release GoDoc License

Getting Started

Installation

CircleCI CLI is available on the following package managers:

Homebrew

brew install circleci

Snap

sudo snap install circleci

Chocolatey

choco install circleci-cli -y

Install script

You can also install the CLI binary by running our install script on most Unix platforms:

curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | bash

By default, the circleci app will be installed to the /usr/local/bin directory. If you do not have write permissions to /usr/local/bin, you may need to run the above command with sudo:

curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | sudo bash

Alternatively, you can install to an alternate location by defining the DESTDIR environment variable when invoking bash:

curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | DESTDIR=/opt/bin bash

You can also set a specific version of the CLI to install with the VERSION environment variable:

curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | sudo VERSION=0.1.5222 bash

Take note that additional environment variables should be passed between sudo and invoking bash.

Checksum verification

If you would like to verify the checksum yourself, you can download the checksum file from the GitHub releases page and verify the checksum of the archive using the circleci-cli_<version>_checksums.txt inside the assets of the release you'd like to install:

On macOS and Linux:

shasum -a 256 circleci-cli_<version>_<os>.tar.gz

and on Windows:

Get-FileHash .\circleci-cli_<version>_<os>.tar.gz -Algorithm SHA256 | Format-List

And compare it to the right checksum depending on the downloaded version in the circleci-cli_<version>_checksums.txt file.

Updating

If you installed the CLI without a package manager, you can use its built-in update command to check for pending updates and download them:

circleci update check
circleci update install

Configure the CLI

After installing the CLI, you must run setup to configure the tool.

$ circleci setup

You should be prompted to enter the CircleCI API Token you generated from the Personal API Token tab

✔ CircleCI API Token:

API token has been set.

✔ CircleCI Host: https://circleci.com

CircleCI host has been set.

Setup complete. Your configuration has been saved.

If you are using this tool on circleci.com, accept the provided default CircleCI Host.

Server users will have to change the default value to your custom address (e.g., circleci.my-org.com).

Note: Server does not yet support config processing and orbs, you will only be able to use circleci local execute (previously circleci build) for now.

Validate A Build Config

To ensure that the tool is installed, you can use it to validate a build config file.

$ circleci config validate

Config file at .circleci/config.yml is valid

Docker

The CLI may also be used without installation by using Docker.

docker run --rm -v $(pwd):/data -w /data circleci/circleci-cli:alpine config validate /data/.circleci/config.yml --token $TOKEN

circleci-agent

In order to maintain backwards compatibility with the circleci binary present in builds, some commands are proxied to a program called circleci-agent.

This program must exist in your $PATH as is the case inside of a job.

The following commands are affected:

  • circleci tests split
  • circleci step halt
  • circleci config migrate

Platforms, Deployment and Package Managers

The tool is deployed through a number of channels. The primary release channel is through GitHub Releases. Green builds on the main branch will publish a new GitHub release. These releases contain binaries for macOS, Linux and Windows. These releases are published from (CircleCI)[https://app.circleci.com/pipelines/github/CircleCI-Public/circleci-cli] using GoReleaser.

Homebrew

We publish the tool to Homebrew. The tool is part of homebrew-core, and therefore the maintainers of the tool are obligated to follow the guidelines for acceptable Homebrew formulae. You should familairise yourself with the guidelines before making changes to the Homebrew deployment system.

The particular considerations that we make are:

  1. Since Homebrew doesn't "like tools that upgrade themselves", we disable the circleci update command when the tool is released through homebrew. We do this by defining the PackageManager constant to homebrew, which allows us to disable the update command at runtime.
  2. We want to avoid every push to main from creating a Pull Request to the circleci formula on Homebrew. We want to avoid overloading the Homebrew team with pull requests to update our formula for small changes (changes to docs or other files that don't change functionality in the tool).

Snap

We publish Linux builds of the tool to the Snap package manager.

Further package information is available on Snap website.

Contributing

Development instructions for the CircleCI CLI can be found in HACKING.md.

More

Please see the documentation or circleci help for more.

Server compatibility

There are some difference of behavior depending on the version you use:

  • config validation will use the GraphQL API until Server v4.0.5, v4.1.3, v4.2.0. The above versions will use the new route compile-config-with-defaults
  • circleci orb validate will only allow you to validate orbs using other private orbs with the option --org-slug from version Server v4.2.0

More Repositories

1

circleci-demo-react-native

A demo React Native project that’s building on CircleCI 2.0 with Workflows
Ruby
234
star
2

slack-orb

Create custom Slack notifications for CircleCI job statuses
Shell
208
star
3

circleci-demo-workflows

Demonstrations of various Workflows features
135
star
4

circleci-demo-javascript-express

Sample Javascript/Express app building on CircleCI
JavaScript
133
star
5

circleci-demo-ios

A sample iOS app that builds on CircleCI
Swift
126
star
6

circleci-demo-docker

Example application using Docker running on CircleCI 2.0
Go
120
star
7

circleci-demo-python-django

Example Django application running on CircleCI
Python
112
star
8

circleci-demo-aws-ecs-ecr

A demo project for deployment to AWS ECS from ECR on CircleCI 2.0.
HCL
107
star
9

circleci-demo-go

Example Go application running on CircleCI
Go
92
star
10

sample-php-laravel

Example CircleCI project using PHP and Laravel
Less
91
star
11

config-preview-sdk

Preview SDK for orb authors
85
star
12

circleci-demo-python-flask

A demo application to learn how to use CircleCI
Python
85
star
13

circleci-demo-ruby-rails

A CircleCI demo project using Ruby and Rails
Ruby
78
star
14

circleci-config-sdk-ts

Generate CircleCI Configuration YAML from JavaScript or TypeScript. Use Dynamic Configuration and the Config SDK together for live generative config.
TypeScript
78
star
15

CircleCI-Env-Inspector

A NodeJS tool for discovering all your secrets on CircleCI
TypeScript
73
star
16

aws-ecr-orb

CircleCI orb for interacting with Amazon's Elastic Container Registry (ECR)
Shell
73
star
17

cimg-base

The CircleCI Base (Ubuntu) Docker Convenience Image.
Dockerfile
66
star
18

circleci-demo-java-spring

Example Java application running on CircleCI
Java
58
star
19

cimg-android

The CircleCI Android Docker Convenience Image.
Dockerfile
53
star
20

aws-ecs-orb

An orb that simplifies deployment to Amazon's Elastic Container Service (ECS). Supports both EC2 and Fargate launch types.
Python
49
star
21

orb-tools-orb

Various tools for authoring and publishing CircleCI orbs
Shell
46
star
22

circleci-config-generator

Script to generate a basic configuration file for CircleCI 2.0
Shell
46
star
23

node-orb

An orb for working with Node.js on CircleCI
Shell
45
star
24

circleci-packer

Packer Workflows to validate, build and deploy AMIs using CircleCI
Shell
42
star
25

cimg-node

The CircleCI Node.js Docker Convenience Image.
Dockerfile
39
star
26

trigger-circleci-pipeline-action

Trigger a CircleCI pipeline from any GitHub Actions event.
TypeScript
34
star
27

android-orb

An orb for working with Android on CircleCI
Shell
33
star
28

cimg-ruby

The CircleCI Ruby Docker Convenience Image.
Dockerfile
29
star
29

cimg-python

The Next-Gen CircleCI Python Docker Convenience Image.
Dockerfile
26
star
30

circleci-demo-aws-eks

A demo project for deployment to AWS EKS on CircleCI 2.0.
Go
25
star
31

jira-connect-orb

Display the status of CircleCI workflows and deployments in Jira!
Shell
25
star
32

path-filtering-orb

Python
24
star
33

circleci-demo-javascript-react-app

Sample ReactJS application running on CircleCI
JavaScript
23
star
34

ruby-orb

The `circleci/ruby` orb source code.
Shell
22
star
35

browser-tools-orb

Quickly and easily install common browsers and browser testing tools on CircleCI
Shell
19
star
36

fyaml

FYAML: a semantic-agnostic convention for decomposing large YAML documents into multiple files.
18
star
37

debug-gpt

AI Powered Devtools Extension
TypeScript
18
star
38

shellcheck-orb

An orb for ShellCheck, a static analysis tool for shell scripts (https://shellcheck.net) — check all scripts in your repository on every commit
Shell
18
star
39

find-circle-yml

Ruby
17
star
40

circleci-config-parser-ts

A parsing library for CircleCI configuration files, powered by the CircleCI Config SDK
TypeScript
17
star
41

aws-eks-orb

An orb to simplify deployments to Amazon Elastic Container Service for Kubernetes (Amazon EKS)
Shell
17
star
42

circleci-yaml-language-server

The official language server for CircleCI YAML configuration files
Go
16
star
43

cimg-openjdk

The CircleCI OpenJDK (Java) Docker Convenience Image.
Dockerfile
15
star
44

cimg-go

The CircleCI Go (Golang) Docker Convenience Image.
Dockerfile
15
star
45

sample-javascript-cfd

Vue
15
star
46

support-articles

Support articles for CircleCI.
HTML
14
star
47

macos-orb

A suite of convenient tools and settings for utilizing MacOS on CircleCI
Shell
13
star
48

cimg-overview

Overview of CircleCI's pilot project for revamped/improved convenience images
13
star
49

circleci-demo-k8s-gcp-hello-app

A sample project that demonstrates using CircleCI to deploy to Google Kubernetes Engine on GCP
Go
12
star
50

continuation-orb

Shell
11
star
51

python-orb

Common CircleCI tasks for the Python programming language.
Shell
11
star
52

circleci-demo-windows

Hello world demo using CircleCI Windows executor
C#
11
star
53

go-orb

Shell
11
star
54

cimg-rust

The CircleCI Rust Docker Convenience Image.
Dockerfile
11
star
55

gcp-gcr-orb

Orb for interacting with Google Container Registry from within a CircleCI build job
Shell
11
star
56

circleci-runner-k8s

Repository with Helm charts to install CircleCI's runner on a Kubernetes cluster.
Smarty
11
star
57

Orb-Template

A template repository for creating orbs, utilized by the orb development kit. Use the CircleCI CLI's `orb init` command to use.
Shell
10
star
58

cimg-deploy

The CircleCI Deploy Docker Convenience Image.
Dockerfile
10
star
59

aws-sam-serverless-orb

AWS serverless Orb
Shell
10
star
60

circleci-demo-elixir-phoenix

A CircleCI demo project using Elixir and Phoenix
Elixir
10
star
61

cimg-shared

Shared resources for prototype convenience images
Shell
10
star
62

aws-code-deploy-orb

Easily deploy applications to AWS CodeDeploy on CircleCI with the aws-code-deploy orb
Shell
9
star
63

windows-preview-docs

Temporary docs on how to use the pre-release preview of Windows builds on CircleCI
9
star
64

cimg-php

The CircleCI PHP Docker image. Based on the `cimg/base` image.
Dockerfile
9
star
65

helm-orb

A CircleCI Orb to simplify deployments to Kubernetes using Helm.
Shell
9
star
66

gcp-cli-orb

Install and configure the Google Cloud CLI (gcloud)
Shell
9
star
67

terraform-orb

Deploy your infrastructure via a CircleCI pipeline using the Terraform orb. Integrate Infrastructure-as-Code (IaC) to help provision and manage any cloud, infrastructure, or service of your choice.
Shell
9
star
68

kubernetes-orb

tools for working with Kubernetes on CircleCI
Shell
9
star
69

cimg-postgres

Dockerfile
8
star
70

aws-s3-orb

Integrate Amazon AWS S3 with your CircleCI CI/CD pipeline easily with the aws-s3 orb.
Shell
8
star
71

circleci-runner-docker

Docker image for CircleCI Runner
Shell
8
star
72

sample-python-cfd

Sample flask app to demonstrate a simple python circleci configuration
Python
7
star
73

github-cli-orb

Bring all of the power and flexibility of the GitHub CLI to your CI/CD pipeline.
Shell
7
star
74

arm-preview-docs

Docs for the preview of Arm resources on CircleCI
7
star
75

jq-orb

quickly and easily install jq in your CircleCI job
7
star
76

maven-orb

Simplify common tasks for building and testing Java projects using Maven on CircleCI.
CSS
6
star
77

hugo-orb

The `circleci/hugo` orb source code.
Shell
6
star
78

heroku-orb

Easily install and use the Heroku CLI with CircleCI to build, test, and deploy your applications to Heroku.
Shell
6
star
79

circleci-server-windows-image-builder

This is an example of how to build a new Windows VM image to be used with CircleCI Server.
PowerShell
6
star
80

server-terraform

Help Terraform modules for CircleCI server
HCL
6
star
81

gcp-gke-orb

Interact with Google Kubernetes Engine (GKE) from CircleCI
Shell
6
star
82

circleci-demo-macos

Hello world demo using CircleCI macOS executor
Swift
5
star
83

cimg-clojure

The Next-Gen CircleCI Clojure Docker Convenience Image.
Dockerfile
5
star
84

Salesforce-sfdx-cli-orb

5
star
85

aws-circleci-modernization-workshop-code

AWS Modernization Workshop with CircleCI code repo
HCL
5
star
86

hacktoberfest

Starting in 2019 CircleCI will now join in the annual tradition of Hacktoberfest! Check here for our current Hacktoberfest landing page and learn how you can participate.
CSS
5
star
87

cimg-mysql

The CircleCI MySQL Docker Convenience Image.
Shell
5
star
88

php-orb

A PHP Orb for CircleCI
Shell
4
star
89

aws-parameter-store-orb

4
star
90

arm-executors

Demo code for the ARM Resource Class executors
HCL
4
star
91

blog-dynamic-config-examples

Example code for the dynamic config blog post
Shell
4
star
92

circleci-demo-clojure-luminus

Example Clojure application running on CircleCI
Clojure
4
star
93

circleci-config

Go library to work with CircleCI config files
Go
4
star
94

circle-policy-agent

Go
4
star
95

sample-dotnet-cfd

C#
3
star
96

sample-java-cfd

Sample springboot app to demonstrate a simple java circleci configuration
Java
3
star
97

circleci-demo-ruby-sinatra

Example Ruby on Rails application running on CircleCI
Ruby
3
star
98

ansible

Python
3
star
99

spinnaker-orb

A CircleCI Orb to simplify deployments via Spinnaker.
3
star
100

cimg-azure

The CircleCI Azure Docker Convenience Image.
Dockerfile
3
star