Pun is an ultrafast, unified toolchain for PHP 8.4+ projects. One native binary formats, lints and analyses your code and installs your Composer packages from composer.json and composer.lock, with its own settings in a single pun.toml. It formats code byte for byte like Laravel Pint, and pun migrate converts your existing Pint, PHP-CS-Fixer, Rector and PHPStan configs.
Install the binary for Linux or macOS (x86_64 or arm64):
curl -fsSL https://pun.laravel.cloud/install | shOr add it to a project with Composer:
composer require --dev punphp/pun
vendor/bin/pun migrate # or: vendor/bin/pun init
vendor/bin/pun check --fixDocumentation for Pun can be found on the Pun website.
Thank you for considering contributing to Pun! Read AGENTS.md for how to build Pun (Rust 1.99 or later), the checks to run, and the upstream tools it is tested against. If Pun is missing a rule you rely on, please open an issue or send a pull request.
Please review our security policy on how to report security vulnerabilities.
Pun would not be possible without Mago, PHP-CS-Fixer, Laravel Pint, PHPStan, Larastan, Rector and Composer. Pun uses Mago's parser and analysis libraries directly and ports behaviour, rules and test fixtures from these projects. Thank you to everyone behind them.
Pun is open-sourced software licensed under the MIT license. The licences of ported code are in licenses/THIRD_PARTY_NOTICES.md, and those of the bundled Rust crates in licenses/THIRD_PARTY_LICENSES.md.
