pun self-update
Replace pun with the latest release.
pun self-update
pun self-update --check
pun self-update v0.1.0
pun self-update installs the latest release, or the version you name. --check only reports whether a newer release is out.
The download passes the same checks as the install script: HTTPS only, the published SHA-256 checksum, an archive with only regular files and directories under punphp-<target>/, and a new binary that reports the expected version. With a signed-in GitHub CLI (gh), the GitHub build attestation must also verify. Set PUN_REQUIRE_ATTESTATION=1 to fail without it.
If Composer installed Pun, run composer update punphp/pun instead.
Update from v0.1.1 or older
v0.1.1 and older check the attestation against the old repository name, punphp/pun, so pun self-update fails when gh is signed in. Reinstall once with the installer:
curl -fsSL https://pun.laravel.cloud/install | sh
Exit codes
| Code | When |
|---|---|
| 0 | Updated, or already up to date |
| 2 | A failed download or check, a Composer install, or another run error |