28 Nov 2026 · 2 min read
PunPHP: one binary to rule your PHP toolchain
Pint, PHPStan, Rector and Composer walk into a bar. Only one Rust binary walks out. Meet PunPHP.

PunPHP: one binary to rule your PHP toolchain
Every PHP project has the same crew hanging around in composer.json: Pint or PHP-CS-Fixer for formatting, PHPStan or Larastan for analysis, Rector for refactoring, and Composer holding the whole thing together. Four tools, four configs, four PHP processes booting up every time you hit save.
Enter PunPHP: one fast Rust binary that wants to do the whole job by itself.
Pow! One command. Bam! One config. Zap! No PHP process to boot.
What is Pun?
Pun is an all-in-one PHP toolchain written in Rust. It formats, lints, analyses, migrates your configs and installs your packages, all from a single CLI. And it doesn't ask you to throw away what you already know. It plays nicely with the tools you're using today:
| Job | Pun command | Compatible with |
|---|---|---|
| Format | pun format | Pint, PHP-CS-Fixer |
| Lint | pun lint --fix | Rector, rector-laravel, Mago rules |
| Analyse | pun analyse | PHPStan, Larastan identifiers |
| Install | pun install | Composer (composer.lock, vendor/) |
| Migrate | pun migrate | pint.json, phpstan.neon, rector.php |
Why it's fast
Pun is a native binary, so there's no PHP runtime to start up before any work happens, and it spreads the work across all your CPU cores. If you've ever watched PHPStan chew through a big Laravel app, you know why that matters.
One config to rule them all
Instead of juggling pint.json, phpstan.neon and rector.php, everything lives in one pun.toml:
[format]
preset = "laravel"
[lint]
sets = ["dead-code", "modernize"]
[analyse]
preset = "recommended"
paths = ["app", "tests"]
baseline = "pun-baseline.toml"
Already have the old configs? Let Pun do the paperwork:
pun migrate
Try it
Install it with one line:
curl -fsSL https://punphp.com/install | sh
Then take it for a spin:
pun format # fix code style
pun lint --fix # apply lint fixes
pun analyse # static analysis
pun install # install dependencies
pun check # format + lint + analyse in one pass
pun check is the one to put in your CI pipeline or pre-commit hook: format, lint and analyse in a single run.
Built for AI agents too
Here's a nice touch: when Pun runs under a coding agent like Claude Code, Cursor or Codex, it prints each problem on a single line. Less noise means fewer tokens, and your agent stays focused on fixing things instead of reading walls of output.
Hero or villain?
Hero mode: one binary, one config, a lot less waiting, and it respects the rule names you already know. Migrating is a single command, and it's MIT licensed.
Villain mode: it's young. PHPStan, Rector and Pint have years of edge cases behind them. Before you swap them out on a client project, try Pun on a branch, run it next to your current tools and compare what each one reports.
My verdict: this one's going on the watchlist. If it keeps its promises, the PHP toolchain could look very different a year from now.
To be continued…
Links
- Website: punphp.com
- Docs: punphp.com/docs
- GitHub: shipfastlabs/pun

