---
title: Installation
description: Install Pun with the standalone installer or Composer.
---

## Standalone installer

Installs to `~/.pun/bin`. It needs no Composer or PHP.

```bash
curl -fsSL https://punphp.com/install | sh
```

For a specific version:

```bash
curl -fsSL https://punphp.com/install | sh -s -- v0.2.7
```

- Update with [`pun self-update`](/docs/commands/self-update).
- Uninstall by deleting `~/.pun`.
- If `~/.pun/bin` is not on your `PATH`, the installer prints the line to add.

## Composer

```bash
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`](/docs/configuration/pun-toml#format).
- Migrating `.php-cs-fixer.php` or `rector.php` needs PHP and that tool.
