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

laravel/pao

Agent-optimized output for PHP tools. Detects AI agents (Claude Code, Cursor, Devin, Gemini CLI, etc.) and replaces verbose PHPUnit/Pest/Paratest/PHPStan/Rector and Laravel Artisan output with minimal structured JSON (and cleaner Artisan text). Zero config; human terminal output unchanged.

View on GitHub
Deep Wiki
Context7

PAO is agent-optimized output for PHP testing tools.

Frequently asked questions about Pao
How does PAO detect AI agents like Claude Code or Cursor?
PAO uses environment and user-agent sniffing to identify AI tools. It checks for known agent signatures (e.g., `Cursor`, `Gemini CLI`) and supports whitelisting via the `PAO_AGENT_WHITELIST` environment variable. No manual configuration is needed for supported agents.
Will PAO break my existing Laravel Artisan commands?
No, PAO only modifies output when an AI agent is detected. Human terminal output remains identical—colors, formatting, and behavior are preserved. It’s a zero-config, opt-in optimization for AI tools.
Does PAO work with Pest, PHPStan, or Paratest in Laravel?
Yes, PAO supports Pest 4-5, PHPStan, Paratest, and PHPUnit 12-13 out of the box. It hooks into these tools via Composer autoload, requiring no additional setup beyond installation.
Can I disable PAO for specific tools (e.g., PHPStan) without disabling it entirely?
Absolutely. Use the `PAO_SKIP_TOOLS` environment variable to exclude tools, like `PAO_SKIP_TOOLS=phpstan`. This lets you opt out per tool while keeping PAO active for others.
What Laravel versions does PAO officially support?
PAO is optimized for Laravel 12+ and requires PHP 8.3+. For older Laravel versions, you may need polyfills or manual adjustments, but core functionality (Artisan output cleaning) auto-discovers in Laravel 12+.
How does PAO’s JSON output help AI agents process test results faster?
PAO converts verbose CLI output (e.g., 10,000+ characters for 1,000 tests) into structured JSON with key fields like `tool`, `result`, `duration_ms`, and `error_details`. This reduces token usage by 99.8% for AI agents like Claude or Cursor.
Is there a performance overhead when PAO is active?
No, PAO adds negligible overhead (~1-5ms) only when processing output for AI agents. In non-agent mode (human terminal), it runs with zero cost, making it safe for CI/CD pipelines.
Can I customize the JSON schema PAO generates?
PAO’s schema is designed for extensibility but may require forking for non-standard use cases. For custom fields, check the contribution guidelines or extend via environment variables like `PAO_CUSTOM_FIELDS`.
What happens if my AI agent isn’t in PAO’s supported list?
Use the `PAO_AGENT_WHITELIST` environment variable to manually add unsupported agents (e.g., `PAO_AGENT_WHITELIST=my-agent`). Audit the list periodically, as new agents are added via community contributions.
How do I test PAO in my CI pipeline before full adoption?
Install PAO in a dev dependency (`composer require laravel/pao --dev`) and run your test suite with an AI agent emulating the environment (e.g., set `PAO_AGENT=test-agent`). Monitor JSON output for correctness without disrupting human workflows.
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.
bugban/symfony
beyonder-capi/workflow-extensions-bundle
beyonder-capi/job-queue-bundle
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
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