vitorsreis / sift
AI-optimized PHP tool wrapper with intelligent output control.
v1.0.0
2026-04-09 02:04 UTC
Requires
- php: ^8.3
- ext-json: *
- ext-simplexml: *
- symfony/process: ^7.4 || ^8.0
Requires (Dev)
- laravel/pint: ^1.29
- pestphp/pest: ^4.4
This package is auto-updated.
Last update: 2026-04-09 15:11:12 UTC
README
AI-optimized PHP tool wrapper with intelligent output control.
Sift is a complete PHP CLI wrapper that provides controlled execution of PHP tools with structured, token-optimized output designed specifically for AI agents and automated workflows.
Why Sift
- Token Reduction: Dramatically reduce token consumption with intelligent output sizing
- Complete Control: Only pre-mapped commands and arguments are allowed
- Smart Rendering: Three output modes tuned for different needs (compact/normal/full)
- Standardized Output: Unified structure across all tools
- Process Visibility: Optional real-time progress display that doesn't affect final output
Installation
Install Sift as a development dependency:
composer require --dev vitorsreis/sift
Or download the latest PHAR release.
Quick Start
Initialize a project config:
vendor/bin/sift init
Run a tool through Sift:
vendor/bin/sift phpstan analyse src
AI Setup
If you use coding agents, you can reference AI_INSTRUCTIONS.md from your project's AI instructions so the agent learns to use Sift in a token-efficient way.
Example note in AGENTS.md:
Use the [Sift Instructions](vendor/vitorsreis/sift/docs/AI_INSTRUCTIONS.md) before running tests, linters, static analysis, and other supported PHP tools.
Supported Tools
phpunit- PHPUnit test runnerpest- Pest PHP testing frameworkparatest- Parallel testingphpstan- Static analysisphpcs/phpcbf- Code standards checkingpsalm- Static analysis toolrector- Automated refactoringpint- Laravel Pint code formattercomposer- Composer package manageraudit,licenses,outdated, andshowsubcommands
Documentation
License
Released under the MIT license.