Use Ruby 3.3 or newer and install the gem from RubyGems:
gem install circleci-cli
circleci-cli versionHave your CircleCI API token ready and list the projects available to your account:
circleci-cli projectsThe CLI uses CIRCLE_CI_TOKEN if set. Otherwise, it prompts for the token
without echoing it. Combine the User name and Repository name columns as
user/project for the next steps.
Replace user/project with the GitHub project you selected. With --all, the
CLI lists builds across branches even when you run it from a Git checkout:
circleci-cli builds -p user/project --allTo narrow the list to one branch, use -b in place of --all:
circleci-cli builds -p user/project -b mainChoose a value from the Number column and pass it to build. The output
shows the build steps and includes logs for failed actions when available:
circleci-cli build -p user/project -n 42