{"id":13646801,"url":"https://github.com/CircleCI-Public/circleci-cli","last_synced_at":"2025-04-21T21:31:29.177Z","repository":{"id":33361022,"uuid":"137903064","full_name":"CircleCI-Public/circleci-cli","owner":"CircleCI-Public","description":"Use CircleCI from the command line","archived":false,"fork":false,"pushed_at":"2024-11-08T21:31:27.000Z","size":29722,"stargazers_count":409,"open_issues_count":138,"forks_count":232,"subscribers_count":58,"default_branch":"develop","last_synced_at":"2024-11-08T22:21:28.740Z","etag":null,"topics":["circle-ci","circleci","cli","command-line-tool","continuous-delivery","continuous-integration","developer-tools","devops","golang","graphql","tool"],"latest_commit_sha":null,"homepage":"https://circleci-public.github.io/circleci-cli/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CircleCI-Public.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-19T14:30:01.000Z","updated_at":"2024-10-27T19:24:20.000Z","dependencies_parsed_at":"2023-10-16T18:38:10.020Z","dependency_job_id":"7a721cb0-66ef-4429-a4f8-a5b862c9f72c","html_url":"https://github.com/CircleCI-Public/circleci-cli","commit_stats":null,"previous_names":[],"tags_count":460,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CircleCI-Public%2Fcircleci-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CircleCI-Public%2Fcircleci-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CircleCI-Public%2Fcircleci-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CircleCI-Public%2Fcircleci-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CircleCI-Public","download_url":"https://codeload.github.com/CircleCI-Public/circleci-cli/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223880284,"owners_count":17219094,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["circle-ci","circleci","cli","command-line-tool","continuous-delivery","continuous-integration","developer-tools","devops","golang","graphql","tool"],"created_at":"2024-08-02T01:03:07.177Z","updated_at":"2025-04-21T21:31:29.170Z","avatar_url":"https://github.com/CircleCI-Public.png","language":"Go","readme":"# circleci-cli\n\nThis is CircleCI's command-line application.\n\n[Documentation](https://circleci-public.github.io/circleci-cli) |\n[Code of Conduct](./CODE_OF_CONDUCT.md) |\n[Contribution Guidelines](./CONTRIBUTING.md) |\n[Hacking](./HACKING.md)\n\n[![CircleCI](https://circleci.com/gh/CircleCI-Public/circleci-cli.svg?style=shield)](https://circleci.com/gh/CircleCI-Public/circleci-cli)\n[![GitHub release](https://img.shields.io/github/tag/CircleCI-Public/circleci-cli.svg?label=latest)](https://github.com/CircleCI-Public/circleci-cli/releases)\n[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/CircleCI-Public/circleci-cli)\n[![License](https://img.shields.io/badge/license-MIT-red.svg)](./LICENSE)\n\n## Getting Started\n\n### Installation\n\nCircleCI CLI is available on the following package managers:\n\n#### Homebrew\n\n```\nbrew install circleci\n```\n\n#### Snap\n\n```\nsudo snap install circleci\n```\n\n#### Chocolatey\n\n```\nchoco install circleci-cli -y\n```\n\n### Install script\n\nYou can also install the CLI binary by running our install script on most Unix platforms:\n\n```\ncurl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | bash\n```\n\nBy 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`:\n\n```\ncurl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | sudo bash\n```\n\nAlternatively, you can install to an alternate location by defining the `DESTDIR` environment variable when invoking `bash`:\n\n```\ncurl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | DESTDIR=/opt/bin bash\n```\n\nYou can also set a specific version of the CLI to install with the `VERSION` environment variable:\n\n```\ncurl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | sudo VERSION=0.1.5222 bash\n```\n\nTake note that additional environment variables should be passed between sudo and invoking bash.\n\n#### Checksum verification\n\nIf you would like to verify the checksum yourself, you can download the checksum file from the [GitHub releases page](https://github.com/CircleCI-Public/circleci-cli/releases) and verify the checksum of the archive using the `circleci-cli_\u003cversion\u003e_checksums.txt` inside the assets of the release you'd like to install:\n\nOn macOS and Linux:\n```sh\nshasum -a 256 circleci-cli_\u003cversion\u003e_\u003cos\u003e.tar.gz\n```\n\nand on Windows:\n```powershell\nGet-FileHash .\\circleci-cli_\u003cversion\u003e_\u003cos\u003e.tar.gz -Algorithm SHA256 | Format-List\n```\n\nAnd compare it to the right checksum depending on the downloaded version in the `circleci-cli_\u003cversion\u003e_checksums.txt` file.\n\n### Updating\n\nIf you installed the CLI without a package manager, you can use its built-in update command to check for pending updates and download them:\n\n```\ncircleci update check\ncircleci update install\n```\n\n## Configure the CLI\n\nAfter installing the CLI, you must run setup to configure the tool.\n\n```\n$ circleci setup\n```\n\nYou should be prompted to enter the _CircleCI API Token_ you generated from the [Personal API Token tab](https://circleci.com/account/api)\n\n\n```\n✔ CircleCI API Token:\n\nAPI token has been set.\n\n✔ CircleCI Host: https://circleci.com\n\nCircleCI host has been set.\n\nSetup complete. Your configuration has been saved.\n```\n\nIf you are using this tool on `circleci.com`, accept the provided default `CircleCI Host`.\n\nServer users will have to change the default value to your custom address (e.g., `circleci.my-org.com`).\n\n**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.\n\n\n## Validate A Build Config\n\nTo ensure that the tool is installed, you can use it to validate a build config file.\n\n```\n$ circleci config validate\n\nConfig file at .circleci/config.yml is valid\n```\n\n\n## Docker\n\nThe CLI may also be used without installation by using Docker.\n\n```\ndocker run --rm -v $(pwd):/data -w /data circleci/circleci-cli:alpine config validate /data/.circleci/config.yml --token $TOKEN\n```\n\n## circleci-agent\n\nIn order to maintain backwards compatibility with the `circleci` binary present in builds, some commands are proxied to a program called `circleci-agent`.\n\nThis program must exist in your `$PATH` as is the case inside of a job.\n\nThe following commands are affected:\n\n* `circleci tests split`\n* `circleci step halt`\n* `circleci config migrate`\n\n## Platforms, Deployment and Package Managers\n\nThe tool is deployed through a number of channels. The primary release channel is through [GitHub Releases](https://github.com/CircleCI-Public/circleci-cli/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](https://goreleaser.com/).\n\n### Homebrew\n\nWe publish the tool to [Homebrew](https://brew.sh/). The tool is [part of `homebrew-core`](https://github.com/Homebrew/homebrew-core/blob/main/Formula/circleci.rb), and therefore the maintainers of the tool are obligated to follow the guidelines for acceptable Homebrew formulae. You should [familiarize yourself with the guidelines](https://docs.brew.sh/Acceptable-Formulae#we-dont-like-tools-that-upgrade-themselves) before making changes to the Homebrew deployment system.\n\nThe particular considerations that we make are:\n\n1. Since Homebrew [doesn't \"like tools that upgrade themselves\"](https://docs.brew.sh/Acceptable-Formulae#we-dont-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](https://github.com/Homebrew/homebrew-core/blob/eb1fdb84e2924289bcc8c85ee45081bf83dc024d/Formula/circleci.rb#L28) constant to `homebrew`, which allows us to [disable the `update` command at runtime](https://github.com/CircleCI-Public/circleci-cli/blob/67c7d52bace63846f87a1ed79f67f257c94a55b4/cmd/root.go#L119-L123).\n\n#### Releasing to Homebrew\n\nThis project is on Homebrew's special [autobump list](https://github.com/Homebrew/homebrew-core/blob/master/.github/autobump.txt) which effectively means that it will check our `main` branch every 3 hours for updates and create a PR automagically if there are any changes. This is great, but you do have to monitor the generated PRs to ensure they pass and do get merged in successfully. The PRs will be raised in this repo: [github.com/Homebrew/homebrew-core](https://github.com/Homebrew/homebrew-core) and you can search the Pull requests for `circleci` to see the generated PRs. \n\nUpon successful merge, you'll be able to upgrade the tool by running `brew upgrade circleci` and then you can validate any changes you may have made.\n\n### Snap\n\nWe publish Linux builds of the tool to the Snap package manager.\n\nFurther [package information is available on Snap website](https://snapcraft.io/circleci).\n\n## Contributing\n\nDevelopment instructions for the CircleCI CLI can be found in [HACKING.md](HACKING.md).\n\n## More\n\nPlease see the [documentation](https://circleci-public.github.io/circleci-cli) or `circleci help` for more.\n\n## Server compatibility\n\n| Functionality | Impacted commands | Change description | Compatibility with Server |\n| --- | --- | --- | --- |\n| Config compilation and validation | \u003cul\u003e\u003cli\u003e`circleci config validate`\u003c/li\u003e\u003cli\u003e`circleci config process`\u003c/li\u003e\u003cli\u003e`circleci local execute`\u003c/li\u003e | The config validation has been moved from the GraphQL API to a specific API endpoint | \u003cul\u003e\u003cli\u003e**Server v4.0.5, v4.1.3, v4.2.0 and above**: Commands use the new specific endpoint\u003c/li\u003e\u003cli\u003e**Previous version**: Commands use the GraphQL API\u003c/li\u003e\u003c/ul\u003e |\n| Orb compilation and validation of orb using private orbs | \u003cul\u003e\u003cli\u003e`circleci orb process`\u003c/li\u003e\u003cli\u003e`circleci orb validate`\u003c/li\u003e\u003c/ul\u003e | To support the validation of orbs requesting private orbs (see [issue](https://github.com/CircleCI-Public/circleci-cli/issues/751)). A field `ownerId` has been added to the GraphQL orb validation endpoint. Thus allowing the `Impacted commands` to use the `--org-id` parameter to enable the orb compilation / validation  | \u003cul\u003e\u003cli\u003e**Server v4.2.0 and above**: The field is accessible so you can use the parameter\u003c/li\u003e\u003cli\u003e**Previous versions**: The field does not exist making the functionality unavailable\u003c/li\u003e\u003c/ul\u003e |\n\n## Telemetry\n\nThe CircleCI CLI includes a telemetry feature that collects basic errors and feature usage data in order to help us improve the experience for everyone.\n\nTelemetry works on an opt-in basis: when running a command for the first time, you will be asked for consent to enable telemetry. For non-TTY STDIN, telemetry is disabled by default, ensuring that scripts that use the CLI run smoothly.\n\nYou can disable or enable telemetry anytime in one of the following ways:\n\n* Run the commands `circleci telemetry enable` or `circleci telemetry disable`\n\n* Set the `CIRCLECI_CLI_TELEMETRY_OPTOUT` environment variable to `1` or `true` to disable it\n\n","funding_links":[],"categories":["Go","CI/CD"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCircleCI-Public%2Fcircleci-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCircleCI-Public%2Fcircleci-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCircleCI-Public%2Fcircleci-cli/lists"}