CircleCLI Command Line Tool (cross-platform)

python
circle.yml

#1

I recently built a command line tool called CircleCLI: https://github.com/TheRealJoeLinux/circlecli

Install with pip:

pip install circlecli

Manual installation:

python setup.py install

I’m adding new features pretty frequently, but it currently supports most of the CircleCI REST API, and also features that have nothing to do with the API:

  • Works on Linux and OSX (should work on Windows, but haven’t tested yet)
  • Setting multiple environment variables simultaneously for a project (good for scripting)
  • Validating circle.yml files (not just valid YAML, but following what the CircleCI docs allow and don’t allow):
circlecli check /path/to/circle.yml
  • Short, readable responses (you can also get the original JSON if you want)
  • Filtering responses

Also, if you happen to write Python code, you can use this programmatically:

from circlecli import CircleAPI

circle = CircleAPI(os.environ['CIRCLE_TOKEN'])
my_acct_info = circle.me(verbose=True)

I’ve been using it myself, and I’ve heard of people using it within their own circle.yml file to perform actions during a build. I’m currently working on adding a feature to check the CircleCI status as well, and I’m always open to suggestions!


Schema / linter for circle.yml files
#2