Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

Coding agents

Compact output for coding agents, how to override it, and machine reports.

When a coding agent runs Pun, Pun prints compact plain text. Check output starts with a summary, followed by findings with project-relative paths:

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.

The output has no color, progress indicator, or boxes. A clean run prints only the summary. Lists stop after 20 items. -v shows every item and the available diffs. Exit codes are the same as in normal output.

pun config and pun list-files print their summary on stderr, so stdout stays plain TOML or one path per line.

Detection and overrides

Pun detects agents from their environment variables. A missing terminal does not turn agent mode on. CURSOR_AGENT counts, but CURSOR_TRACE_ID alone does not.

Overrides apply in this order, highest priority first:

Override Effect
--agent / --no-agent Force agent output on or off for this run
PUN_AGENT=1 / PUN_AGENT=0 Same, from the environment
PAO_DISABLE=1 / PAO_FORCE=1 Disable or force agent mode; disable wins

Explicit reports

An explicit --format overrides agent output. For format, lint, and check, --format=json prints PHP-CS-Fixer’s JSON, and --format=agent prints Pint’s JSON agent report. Neither is Pun’s plain-text agent output.

Laravel Boost

The punphp/pun package ships a Laravel Boost guideline and a pun-development skill. They tell the agent to run pun check --fix --dirty after it changes PHP files, and to use Pun’s package commands instead of Composer’s. php artisan boost:install offers them when composer.lock lists punphp/pun as a direct dependency.

Markdown docs

Append .md to a docs URL for Markdown. /llms.txt lists the documentation pages.

Last updated on

Was this page helpful?