circleci-tools/circleci-cli
Über uns
:cyclone: CLI client / command line tool for CircleCI
EntwicklerwerkzeugeWhat you can do
- List followed projects and filter recent builds by branch.
- Inspect build steps and logs, or watch running builds in real time.
- Summarize a run's workflows and jobs, including uploaded test failures on request.
- Retry or cancel builds and open project or build pages in your browser.
Gemessener Sternzuwachs
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 0
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
README.md
Originalcircleci-cli
circleci-cli is a CLI tool for Circle CI.

Features
- List followed projects and filter recent builds by branch.
- Inspect build steps and logs, or watch running builds in real time.
- Summarize a run's workflows and jobs, including uploaded test failures on request.
- Retry or cancel builds and open project or build pages in your browser.
- List and approve pending workflow approval jobs from a run.
- List, set, and delete a project's environment variables.
Installation
Install the released gem from RubyGems with Ruby 3.3 or newer:
$ gem install circleci-cli
The run, artifacts, approve, and env commands were added after
v4.0.4. To try them from source, use the Ruby version
in .ruby-version and the Bundler version listed under
BUNDLED WITH in Gemfile.lock:
git clone https://github.com/circleci-tools/circleci-cli.git
cd circleci-cli
bin/setup
bundle exec ruby -Ilib exe/circleci-cli help
From the checkout, replace circleci-cli in the examples with
bundle exec ruby -Ilib exe/circleci-cli.
set the CIRCLE_CI_TOKEN environment variable. (optional)
export CIRCLE_CI_TOKEN=your-circle-ci-token
Quick start
In a local checkout of a GitHub project that builds on CircleCI, switch to the branch you want to inspect and run:
circleci-cli builds
Enter your CircleCI API token when prompted if CIRCLE_CI_TOKEN is unset.
The command identifies the project from the GitHub origin remote and shows a table of recent builds on the current branch, including their build numbers and statuses.
See the getting started guide to find a project and inspect a build from any directory.
Usage
See the command reference for command options, Git defaults,
and token configuration. Run circleci-cli help COMMAND to see the options
for an individual command.
Examples
Show every job in a run
With CIRCLE_CI_TOKEN set, list your recent runs with the CircleCI API and
copy the id next to the run number you want:
curl -fsS -G 'https://circleci.com/api/v3/runs' \
-H "Authorization: Bearer ${CIRCLE_CI_TOKEN}" \
--data-urlencode 'filter[user_id]=me' | jq -r '.data[] | [.attributes.number, .id] | @tsv'
circleci-cli run 123e4567-e89b-12d3-a456-426614174000
On projects supported by build, use the displayed job number to inspect its
steps, for example circleci-cli build -p user/project -n 42.
Use circleci-cli run RUN_ID --failed-tests to include failed tests from jobs
that failed, grouped by workflow and job. Jobs must upload test results with
store_test_results for test details to appear. Each reported failure is
shown in order, including repeats from parallel executions, within the output
limits. Records over 256 KiB are skipped, and the failed-test section is
limited to 1 MiB per run. The section reports when details were omitted.
List and download artifacts from a run
circleci-cli artifacts RUN_ID
circleci-cli artifacts RUN_ID --download 'screenshots/**/*.png' --destination ./artifacts
The list shows each artifact's workflow, job name, job UUID, execution index,
and path. Downloads require both a path glob and a destination. Quote the glob
to prevent your shell from expanding it. The CLI matches the glob against the
original path returned by the API. Terminal output escapes control characters,
so a path copied from the list may fail to match. If the list shows
report\x61C\x202Efdp.exe, use a wildcard between the visible parts:
circleci-cli artifacts RUN_ID --download 'report*fdp.exe' --destination ./artifacts
Files are saved under DESTINATION/JOB_UUID/EXECUTION/PATH, so parallel
executions can keep the same artifact path. A completed download replaces any
existing file at that path.
Downloads require a POSIX platform with Ruby support for Dir.fchdir.
Artifact listing works without this filesystem support.
Approve a pending workflow approval job
circleci-cli approve RUN_ID
circleci-cli approve RUN_ID --job deploy-approval
Without --job, the command lists pending approval jobs grouped by workflow.
With --job NAME, it approves the pending job with that name; the command
fails if no pending job, or more than one, matches the name.
Watch your project
$ circleci-cli watch
Watch your project and show all of the build log
$ circleci-cli watch -v
Show last failed build
$ circleci-cli build --last
Retry last failed build
The retry command requires a CircleCI personal API token and prints the ID of the new workflow.
$ circleci-cli retry --last
Open CircleCI webpage for current project
$ circleci-cli browse
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/circleci-tools/circleci-cli. See the contributing guide for development setup and checks.
License
The gem is available as open source under the terms of the MIT License.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Yuji Ueki 💻 |
Matt Brictson 💻 ⚠️ |
Fletcher Fowler 🐛 🤔 💻 |
Marco Costa 🤔 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Author
Ähnliche Projekte entdecken
Wird geladen…