Installation
Install Pun with the standalone installer or Composer.
Standalone installer
Installs to ~/.pun/bin. It needs no Composer or PHP.
curl -fsSL https://punphp.com/install | sh
For a specific version:
curl -fsSL https://punphp.com/install | sh -s -- v0.2.7
- Update with
pun self-update. - Uninstall by deleting
~/.pun. - If
~/.pun/binis not on yourPATH, the installer prints the line to add.
Composer
composer require --dev shipfastlabs/pun
vendor/bin/pun --version
Update with composer update shipfastlabs/pun. In a project, run vendor/bin/pun, or call pun from a Composer script.
On its first run, vendor/bin/pun downloads the release binary for your platform and checks its SHA-256 checksum. With a signed-in gh, it also checks the GitHub build attestation. Set PUN_REQUIRE_ATTESTATION=1 to require it.
Requirements
- Your project targets PHP 8.3 or later.
- Format, lint, and analyse need no PHP or Node.js.
- Blade formatting needs Node.js with Prettier, unless you set
blade = "native". See[format] blade. - Migrating
.php-cs-fixer.phporrector.phpneeds PHP and that tool.