AI-optimized PHP tool wrapper with intelligent output control.

Maintainers

Package info

github.com/vitorsreis/sift

pkg:composer/vitorsreis/sift

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 4

Open Issues: 0

v1.0.0 2026-04-09 02:04 UTC

This package is auto-updated.

Last update: 2026-04-09 15:11:12 UTC


README

Sift

AI-optimized PHP tool wrapper with intelligent output control.

PHP Version Packagist Downloads Tests License

Sift preview

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 runner
  • pest - Pest PHP testing framework
  • paratest - Parallel testing
  • phpstan - Static analysis
  • phpcs / phpcbf - Code standards checking
  • psalm - Static analysis tool
  • rector - Automated refactoring
  • pint - Laravel Pint code formatter
  • composer - Composer package manager audit, licenses, outdated, and show subcommands

Documentation

Full Documentation

License

Released under the MIT license.