Laravel PAO (PHP Agent-Optimized Output) is a new dev dependency included by default in new Laravel applications. It detects when PHP tools like PHPUnit, Pest, Paratest, PHPStan, Rector, and Artisan are being run inside an AI agent environment (Claude Code, Cursor, Devin, etc.) and reformats their output into compact, structured JSON. Human terminal output remains unchanged. PAO works via Composer's file autoload, injecting itself early in the PHP process, and uses each tool's native APIs rather than scraping terminal text. The result is cleaner, token-efficient output that helps AI agents identify failures, file paths, line numbers, and error details without parsing ANSI-decorated terminal noise.
Table of contents
# What Changes with Laravel PAO# PAO Supports the Tools You Already Use# Cleaner Artisan Output# Your Terminal Stays the Same# How PAO Works Under the Hood# Available by Default to Provide Better Defaults for AI Agents2 Comments
Sort: