https://github.com/semperos/cci
CircleCI API CLI Client
https://github.com/semperos/cci
Last synced: 3 months ago
JSON representation
CircleCI API CLI Client
- Host: GitHub
- URL: https://github.com/semperos/cci
- Owner: semperos
- License: mpl-2.0
- Created: 2018-08-09T23:26:34.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-12-08T17:42:57.000Z (over 5 years ago)
- Last Synced: 2025-01-15T23:31:39.753Z (over 1 year ago)
- Language: Clojure
- Size: 31.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# CircleCI Client
A client for the [CircleCI API](https://circleci.com/docs/api/v1-reference/).
Also an example of building a CLI application
in Clojure and compiling it to a native executable using
[GraalVM](https://www.graalvm.org/).
## Installation
[Download](https://github.com/semperos/cci/releases) a recent release and put it
on your `PATH`.
## Usage
1. If you don't have one, generate a CircleCI API token [here]().
1. Set a `CIRCLE_TOKEN` environment variable with your token.
1. If you have only one GitHub or Bitbucket project, set `CIRCLE_PROJECT_USER`
or `CIRCLE_PROJECT_ORG` so you don't have to specify a `--username` at
the CLI.
1. If you're using Bitbucket, set `CIRCLE_VCS_TYPE` so you don't have to specify
your project's `--vcs-type` at the CLI.
Turn off colored output by passing `--no-color`.
For full details:
```
cci -h
```
## Examples
### Latest Builds
To get the last 5 builds for your project:
```
cci -p your-project
```
To focus on one branch:
```
cci -p your-project -b your-branch
```
To pull back more:
```
cci -p your-project -l 25
```
In case you didn't read the usage section and you've not defined any environment
variables:
```
cci -t your-token \
-u your-username \
-p your-project \
-v your-vcs-type \ # default of 'github'
-b your-branch \ # optional
-l a-limit # default of 5
```
## License
Copyright © 2018 Daniel Gregoire
Distributed under the
[Mozilla Public License version 2.0](https://www.mozilla.org/en-US/MPL/2.0/).
Code copied and edited from [tools.cli](https://github.com/clojure/tools.cli)
in the `com.semperos.cci.cli` namespace maintains its own copyright and license,
which has been included in the source code.