styleci / cli
The CLI tool for StyleCI
- 1.5.x-dev
- v1.5.1
- v1.5.0
- 1.4.x-dev
- v1.4.0
- 1.3.x-dev
- v1.3.2
- v1.3.1
- v1.3.0
- 1.2.x-dev
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- 1.1.x-dev
- v1.1.2
- v1.1.1
- v1.1.0
- 1.0.x-dev
- v1.0.1
- v1.0.0
- 0.9.x-dev
- v0.9.3
- v0.9.2
- v0.9.1
- v0.9.0
- 0.8.x-dev
- v0.8.1
- v0.8.0
- 0.7.x-dev
- v0.7.0
- 0.6.x-dev
- v0.6.3
- v0.6.2
- v0.6.1
- v0.6.0
- 0.5.x-dev
- v0.5.1
- v0.5.0
This package is auto-updated.
Last update: 2024-11-12 01:33:58 UTC
README
Installation
The StyleCI CLI Tool requires PHP 7.4 or higher, and can be installed either by directly downloading the phar, or using Composer.
Download the Phar
Global installation:
$ curl -SsLo styleci.phar https://github.com/StyleCI/CLI/releases/download/v1.5.1/styleci.phar \ && chmod +x styleci.phar && sudo mv styleci.phar /usr/local/bin/styleci
Require using Composer
Local installation:
$ composer require styleci/cli:^1.5 --dev
Global installation:
$ composer global require styleci/cli:^1.5
First Time Setup
When using the tool for the first time, you may want to enter your StyleCI API keys. You can do this with the styleci config
command, which will store your keys in ~/.styleci/config.json
, just like how Composer store keys.
StyleCI for GitHub:
styleci config auth.github YOUR-API-KEY-GOES-HERE
Your API key is available at https://github.styleci.io/profile.
StyleCI for GitLab:
styleci config auth.gitlab YOUR-API-KEY-GOES-HERE
Your API key is available at https://gitlab.styleci.io/profile.
StyleCI for Bitbucket:
styleci config auth.bitbucket YOUR-API-KEY-GOES-HERE
Your API key is available at https://bitbucket.styleci.io/profile.
Usage
Now, you can analyze any local copy of a repo enabled in StyleCI, from the console! Simply run:
$ styleci
and StyleCI will analyze your current directory.
Environment Variables
If you have chosen not use the first time setup config, or would like to temporarily override the stored keys, this can be done by setting environment variables.
StyleCI for GitHub:
$ STYLECI_GITHUB_API_KEY=YOUR-API-KEY-GOES-HERE styleci
StyleCI for GitLab:
$ STYLECI_GITLAB_API_KEY=YOUR-API-KEY-GOES-HERE styleci
StyleCI for Bitbucket:
$ STYLECI_BITBUCKET_API_KEY=YOUR-API-KEY-GOES-HERE styleci
Advanced Usage
You can optionally pass a directory to analyze, otherwise, the current working directory will be used. Moreover, we support analyzing only the changed files, performing a "dry run" without touching your files, and more:
Usage:
analyze [options] [--] [<directory>]
Arguments:
directory
Options:
-c, --only-changed
-d, --dry-run
-g, --git-binary=GIT-BINARY
-r, --remote-name=REMOTE-NAME
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages
Note that styleci
is shorthand for styleci analyze
. This will matter if you want to analyze a directory with relevative path config
, or any other command name. You will need to write styleci analyze config
in order to use such a <directory>
argument.
License
This tool is licensed under The Apache License 2.0.