---
title: Coding agents
description: How Pun talks to coding agents like Claude Code, Cursor and Codex.
---

When a coding agent runs Pun, Pun keeps it short: one summary line, then one line per problem.

```
pun check: fail, 1 error, 2 files with fixes (412 checked, 0.21s)
app/A.php format/arrays/syntax, format/tags/blank-line-after-opening
app/B.php lint/style/no-alias-function [fix:unsafe] Master functions shall be used instead of aliases.
app/D.php:2 syntax-error Parse error: syntax error, unexpected token ";" on line 2.
```

No colors, no spinners, no boxes. A clean run prints just the summary. Long lists stop at 20, and `-v` shows everything. Exit codes stay the same.

## How Pun knows

Agents like Claude Code, Cursor and Codex set environment variables, and Pun looks for them. No terminal alone doesn't count as an agent.

Want to force it? Use any of these (top one wins):

| Switch | What it does |
| --- | --- |
| `--agent` / `--no-agent` | On or off for this run |
| `PUN_AGENT=1` / `PUN_AGENT=0` | Same, from the environment |
| `PAO_FORCE=1` / `PAO_DISABLE=1` | On or off. `PAO_DISABLE` wins if both are set |

## JSON reports

If you pass `--format`, that wins over agent output. `--format=json` gives PHP-CS-Fixer's JSON, and `--format=agent` gives Pint's JSON.

## Laravel Boost

The `shipfastlabs/pun` package comes with a [Laravel Boost](https://github.com/laravel/boost) guideline and a `pun-development` skill. They tell your agent to run `pun check --fix --dirty` after it edits PHP, and to use Pun for packages instead of Composer.

Run `php artisan boost:install` and it offers them, as long as `shipfastlabs/pun` is a direct dependency.

## Docs as Markdown

Add `.md` to any docs URL to get plain Markdown. [`/llms.txt`](/llms.txt) lists every page.
