PHPackages                             styleci/cli - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. styleci/cli

ActiveLibrary[CLI &amp; Console](/categories/cli)

styleci/cli
===========

The CLI tool for StyleCI

v1.6.0(1y ago)71477.7k↓28.6%1[1 issues](https://github.com/StyleCI/CLI/issues)8Apache-2.0PHP ^7.4.15 || ^8.0.2

Since Jul 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/StyleCI/CLI)[ Packagist](https://packagist.org/packages/styleci/cli)[ RSS](/packages/styleci-cli/feed)WikiDiscussions 1.6 Synced 2w ago

READMEChangelog (10)DependenciesVersions (41)Used By (8)

StyleCI CLI Tool
================

[](#styleci-cli-tool)

[![StyleCI Banner](https://user-images.githubusercontent.com/2829600/72653462-e6dd0e80-3982-11ea-8d12-9cc1e5057af1.jpg)](https://user-images.githubusercontent.com/2829600/72653462-e6dd0e80-3982-11ea-8d12-9cc1e5057af1.jpg)

Installation
------------

[](#installation)

The StyleCI CLI Tool requires [PHP](https://php.net) 7.4 or higher, and can be installed either by directly downloading the phar, or using [Composer](https://getcomposer.org/).

### Download the Phar

[](#download-the-phar)

Global installation:

```
$ curl -SsLo styleci.phar https://github.com/StyleCI/CLI/releases/download/v1.6.0/styleci.phar \
    && chmod +x styleci.phar && sudo mv styleci.phar /usr/local/bin/styleci
```

### Require using Composer

[](#require-using-composer)

Local installation:

```
$ composer require styleci/cli:^1.6 --dev
```

Global installation:

```
$ composer global require styleci/cli:^1.6
```

First Time Setup
----------------

[](#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-for-github)

```
styleci config auth.github YOUR-API-KEY-GOES-HERE

```

> Your API key is available at .

#### StyleCI for GitLab:

[](#styleci-for-gitlab)

```
styleci config auth.gitlab YOUR-API-KEY-GOES-HERE

```

> Your API key is available at .

#### StyleCI for Bitbucket:

[](#styleci-for-bitbucket)

```
styleci config auth.bitbucket YOUR-API-KEY-GOES-HERE

```

> Your API key is available at .

Usage
-----

[](#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

[](#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-for-github-1)

```
$ STYLECI_GITHUB_API_KEY=YOUR-API-KEY-GOES-HERE styleci
```

#### StyleCI for GitLab:

[](#styleci-for-gitlab-1)

```
$ STYLECI_GITLAB_API_KEY=YOUR-API-KEY-GOES-HERE styleci
```

#### StyleCI for Bitbucket:

[](#styleci-for-bitbucket-1)

```
$ STYLECI_BITBUCKET_API_KEY=YOUR-API-KEY-GOES-HERE styleci
```

### Advanced Usage

[](#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] [--] []

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 `` argument.

License
-------

[](#license)

This tool is licensed under [The Apache License 2.0](LICENSE).

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 95.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~42 days

Recently: every ~185 days

Total

41

Last Release

515d ago

Major Versions

0.9.x-dev → v1.0.02020-12-26

PHP version history (3 changes)v0.5.0PHP ^7.2.5

v0.9.0PHP ^7.2.5 || ^8.0

v1.5.0PHP ^7.4.15 || ^8.0.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/d95eb26cb8f3919bb5ca3b6d823daeabbf259663778a970349b245c580713c8e?d=identicon)[graham-campbell](/maintainers/graham-campbell)

---

Top Contributors

[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (45 commits)")[![adhocore](https://avatars.githubusercontent.com/u/2908547?v=4)](https://github.com/adhocore "adhocore (1 commits)")[![HDVinnie](https://avatars.githubusercontent.com/u/12850699?v=4)](https://github.com/HDVinnie "HDVinnie (1 commits)")

### Embed Badge

![Health badge](/badges/styleci-cli/health.svg)

```
[![Health](https://phpackages.com/badges/styleci-cli/health.svg)](https://phpackages.com/packages/styleci-cli)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

13046.6M7.4k](/packages/illuminate-console)[winbox/args

Windows command-line formatter

20722.5k21](/packages/winbox-args)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
