---
title: pun extension
description: List built-in extensions.
---

List the built-in extensions and whether each is on. An extension adds rules for a framework or test tool.

## Usage

```bash
pun extension list [options]
```

```bash
pun extension list
pun extension list --format json
```

## Options

| Option | Description |
| --- | --- |
| `--format json` | Print JSON. |
| `--config <path>` | Use this `pun.toml`. |

## What happens

- Prints each extension, `on` or `off`, and why.
- If a package is in `composer.lock` but its extension is off, shows the line to add.

```text
laravel  on   Laravel's rules and Larastan's analysis: on in pun.toml
pest     off  Rules for Pest tests: pestphp/pest v4.1.0 is locked; turn it on with pest = "on" in [extensions]
phpunit  off  Rules for PHPUnit tests: not in pun.toml
carbon   off  Carbon's macros and DatePeriodBase in analyse: not in pun.toml
```

| Extension | Adds |
| --- | --- |
| `laravel` | Laravel lint and analyse rules, and Larastan's checks. |
| `pest` | Pest lint rules. |
| `phpunit` | PHPUnit lint rules. |
| `carbon` | Carbon's PHPStan extension in analyse. Each class that implements `CarbonInterface` gets the macros that `X::macro('name', ...)` calls register in the analysed, scanned, and bootstrap files. Pun reads these calls without running PHP. A macro that is registered at runtime in any other way, such as with a dynamic name, isn't found. |

An extension is on only when [`[extensions]`](/docs/configuration/pun-toml#extensions) says `"on"`. `pun init` and `pun migrate` write that for you.

## Exit codes

| Code | Meaning |
| --- | --- |
| 0 | Printed. |
| 2 | The config could not be read. |
