PHP Insights CLI

The project-local CLI checks PHP quality, style and complexity so an agent can inspect findings before changing the app.

  • 5,647 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • Composer adds dependencies and PHP Insights runs analysis tools in the project environment; inspect results before editing code.
All reasons and checks

nunomaduro/phpinsights

Install

Manual install

composer require nunomaduro/phpinsights --dev

First Quick start block, adding a development dependency to the current PHP project.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Composer adds dependencies and PHP Insights runs analysis tools in the project environment; inspect results before editing code.

This is third-party code. Review the repository files before installing.

What it does

PHP Insights analyzes project quality and style from the terminal. An agent runs the project-local command, inspects findings and selects specific code to improve. Separate summaries cover architecture and complexity. It supports PHP projects including Laravel, Symfony, Yii and Magento. Laravel has an Artisan command and configuration publishing. The agent can rerun checks after editing to verify the original finding.

Who it is for. PHP application maintainers starting refactoring from concrete findings and a complexity overview.

Good fit when

  • Refactoring needs an initial PHP code overview.
  • A small edit needs checking for new style issues.
  • A Laravel team wants Artisan-based checks.
  • Review needs concrete findings selected for correction.

Not a fit when

  • A quality score would replace application tests.
  • The project cannot add a Composer development dependency.
  • The selected package does not support the installed PHP version.

Example request

Run PHP Insights in this project and select three concrete findings for discussion without editing code yet.

Limitations

Install the package as a project development dependency and review Composer-file changes before saving them. The current source requires PHP 8.4 or later in the 8.x line and the required extensions; verify the selected release separately. Align rules with application conventions to avoid treating style differences as defects. Static analysis does not verify business behavior or service operation, so confirm fixes with project tests.

How to disable. Remove PHP Insights from check scripts and remove the development dependency if needed. Review retained configuration and code changes separately.

FAQ

How do I check a plain PHP project?

Run `./vendor/bin/phpinsights` from the project root.

Which command is used in Laravel?

After publishing configuration, use `php artisan insights`.

Is it limited to Laravel?

No. PHP Insights also supports Symfony, Yii, Magento and other PHP projects.

What does the report show?

Quality and style findings with architecture and complexity summaries.

Does it replace tests?

No. Run application behavior tests after fixes.

Discussion

No questions or reviews yet.

CLI tools

A code-review CLI and plugin for agents: reads a git diff and writes line-level comments with context

CLIExtended access49.6KRepository stars

A Claude Code plugin marketplace for Shopware: PHPStan, PHPUnit, ESLint, test generation and CI failure analysis

PluginExtended access45Repository stars

A CLI searches package registries, GitHub and Hacker News for similar developer tools and ranks results before you build an idea.

CLIExtended access560Repository stars
Official

An MCP server and CLI for code research: search and understand your project and all of GitHub with fewer tokens

MCP serverExtended access957Repository stars

PsySH evaluates PHP interactively, inspects variables, code and documentation, and opens debug breakpoints inside CLI scripts.

CLIExtended access9.8KRepository stars
Russian stack

A GitHub Copilot plugin with PHP and Bitrix coding conventions, template reformatting commands, and Bitrix24's official developer MCP server wired in

PluginExtended access

README in short

The package combines PHP analysis and coding-standard tools. Composer keeps it with project dependencies.

README badge

Report a problem

Foxx AIPHP Insights
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.