PHPackages                             griffbrad/phpstorm-cli-inspector - 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. griffbrad/phpstorm-cli-inspector

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

griffbrad/phpstorm-cli-inspector
================================

1.0(11y ago)244PHPPHP &gt;=5.3.0

Since May 30Pushed 11y agoCompare

[ Source](https://github.com/griffbrad/phpstorm-cli-inspector)[ Packagist](https://packagist.org/packages/griffbrad/phpstorm-cli-inspector)[ RSS](/packages/griffbrad-phpstorm-cli-inspector/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

phpstorm-cli-inspector
======================

[](#phpstorm-cli-inspector)

A tool to make it easier to run PHPStorm inspections on the command-line.

PHPStorm offers a variety of very helpful inspections to help you catch errors in your code. Many people don't realize that you can also run these inspections on the command-line without even opening the PHPStorm IDE. This is possible using the inspect.sh script that ships with PHPStorm, as documented here:

Unfortunately, the arguments required to use this script are a bit tricky and easy to get wrong. On top of that, the output is just a bunch of XML files that group the issues based upon the type of the problem that was found, rather than the file the problem was found inside.

How does phpstorm-cli-inspector help?
-------------------------------------

[](#how-does-phpstorm-cli-inspector-help)

To use PHPStorm's inspect.sh on a sub-directory of your project, you'd typically need to run this command:

`/Applications/PhpStorm.app/bin/inspect.sh /delta/my-example-project/ /delta/my-example-project/.idea/inspectionProfiles/Project_Default.xml /tmp/output -d /delta/my-example-project/vendor/deltasystems/dewdrop/Dewdrop/Db/Dbdeploy/`

After running the inspections, you'd look through the XML files to see the results.

With phpstorm-inspect, this command becomes just:

`phpstorm-inspect /delta/my-example-project/vendor/deltasystems/dewdrop/Dewdrop/Db/Dbdeploy/`

And the errors are displayed immediately in your terminal, grouped by the name of file they were found in. The path used in the phpstorm-inspect command can be any sub-directory inside your PHPStorm project's files. You don't have to manually point it at your inspection profile, .idea folder, etc. And the XML files are cleaned up for you automatically when the command completes.

Here's some example output:

```
$ ./bin/phpstorm-inspect /delta/my-example-project/vendor/deltasystems/dewdrop/Dewdrop/Db/Dbdeploy/
vendor/deltasystems/dewdrop/Dewdrop/Db/Dbdeploy/Changeset.php
=============================================================

* Line 169: PHPDoc comment doesn't contain all necessary @throws tag(s)

vendor/deltasystems/dewdrop/Dewdrop/Db/Dbdeploy/CliExec.php
===========================================================

* Line 198: PHPDoc comment doesn't contain all necessary @throws tag(s)
```

Installing phpstorm-inspect
---------------------------

[](#installing-phpstorm-inspect)

You install phpstorm-inspect with Composer:

```
composer global require 'griffbrad/phpstorm-cli-inspector:>=1.0'
sudo ln -s ~/.composer/vendor/bin/phpstorm-inspect /usr/local/bin/phpstorm-inspect
```

Note that the above command assumes you've installed Composer globally as described here:

FAQ
---

[](#faq)

*Does it work in Windows?*

No. If any Windows users want to make it work, I'd be glad to accept pull requests.

*What if PHPStorm is in a non-standard location?*

You can add a .phpstorm-inspect.ini configuration file to your home folder. You can specify two things in that configuration: "inspectPath", which would point to the inspect.sh that ships with PHPStorm, and "excludePatterns", which should be regular expressions that will exclude matching problem descriptions.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

4371d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f5a6fc0062bb26252548acc1edf488901e20fbe3b466b15df94a33af20e95c9?d=identicon)[griffbrad](/maintainers/griffbrad)

### Embed Badge

![Health badge](/badges/griffbrad-phpstorm-cli-inspector/health.svg)

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

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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