Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Pao Laravel Package

nunomaduro/pao

Laravel PAO provides agent-optimized output for PHP tools. When it detects AI agents (Claude Code, Cursor, Devin, Gemini CLI), it replaces verbose CLI output from PHPUnit/Pest/Paratest/PHPStan/Rector/Artisan with minimal structured JSON—zero config, no impact on human terminal runs.

View on GitHub
Deep Wiki
Context7

PAO is agent-optimized output for PHP testing tools.

Frequently asked questions about Pao
How do I install Laravel PAO for PHPUnit/Pest testing?
Run `composer require laravel/pao --dev`—it auto-hooks into PHPUnit, Pest, Paratest, and other tools. No config needed. Works with Laravel 12+ and PHP 8.3+.
Will PAO break my existing terminal output for developers?
No. PAO only activates when it detects AI agents (e.g., Claude Code, Cursor). Human terminal runs remain unchanged with full ANSI colors and formatting.
Does Laravel PAO support custom PHPUnit listeners or plugins?
PAO handles core PHPUnit/Pest output, but custom listeners or plugins with non-standard CLI formatting might cause inconsistencies. Test thoroughly if using advanced setups.
Can I use PAO with Laravel 11 or PHP 8.2?
No. PAO requires Laravel 12+ and PHP 8.3+ for compatibility with modern PHPUnit/Pest/Rector versions. Upgrade first if needed.
How does PAO detect AI agents like Cursor or Gemini CLI?
PAO checks the `HTTP_USER_AGENT` or `PAO_AGENT_USER_AGENT` environment variable for known AI agent patterns. It’s open-source, so you can extend detection logic if needed.
Will PAO slow down my test suite or Artisan commands?
Minimal overhead (~5-10ms per test run). The tradeoff is massive token savings for AI agents (99.8% reduction in output size), with zero impact on human workflows.
Does PAO work with PHPStan or Rector in Laravel?
Yes. PAO auto-detects and optimizes output for PHPStan, Rector, and other CLI tools alongside PHPUnit/Pest. No extra setup required.
What if my CI/CD pipeline relies on parsing test output logs?
PAO preserves human-readable output in CI unless explicitly run via an AI agent. For CI-specific needs, use `PAO_ENABLED=false` to disable it.
Are there alternatives to PAO for AI-friendly test output?
Manual JSON output parsing or custom scripts are alternatives, but PAO is the only zero-config, Laravel-optimized solution for PHPUnit/Pest/Artisan with AI agent detection.
How do I disable PAO if it’s causing issues?
Set `PAO_ENABLED=false` in your environment. This forces PAO to skip all output transformations, reverting to default CLI behavior.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
graham-campbell/flysystem
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
directorytree/opensearch-client
directorytree/opensearch-adapter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin