realodix / haiku
A tool to manage and maintain Adblock filter lists.
Requires
- php: ^8.4
- clue/ndjson-react: ^1.3
- fidry/cpu-core-counter: ^1.3
- illuminate/container: ^13.14
- illuminate/support: ^13.14
- nesbot/carbon: ^3.12
- nette/schema: ^1.3
- react/child-process: ^0.6.7
- react/event-loop: ^1.6
- react/socket: ^1.17
- symfony/console: ^8.1
- symfony/filesystem: ^8.1
- symfony/finder: ^8.1
- symfony/polyfill-php85: ^1.38
- symfony/yaml: ^8.1
Requires (Dev)
- mockery/mockery: ^1.6
- phpbench/phpbench: ^1.6
- phpstan/phpstan: ^2.2
- phpunit/phpunit: ^13.2
- realodix/relax: ^1.22
This package is auto-updated.
Last update: 2026-06-22 01:47:48 UTC
README
Realodix Haiku
Haiku is a powerful command-line tool for managing adblock filter lists efficiently. It automates repetitive tasks such as merging sources, optimizing, and tidying up filter lists effortlessly.
# Three capabilities, one tool
01/Lint - Static analysis
Analyze your filter lists to catch syntax errors, structural defects, and invalid filter options / modifiers before they impact users. Built with deep understanding of Adblock Plus, AdGuard, and uBlock Origin syntaxes.
02/Fix - Optimizer & Normalizer
An opinionated optimizer that sorts, combines, and deduplicates rules for a leaner, faster-loading filter list. No manual formatting roulette; drop it in, automate it, and move on.
For a complete list of transformations, see docs/fixer-feature.md.
03/Build - Compiler & Bundler
Compile multiple filter sources (local files and/or remote URLs) into a single, unified output. Automatically regenerates header metadata, strips unnecessary lines such as comments, and delivers a production-ready deployment.
# Three steps to first run
- Install. Install the package via Composer —
composer require realodix/haiku. - Initialize. Run
vendor/bin/haiku initin your project root. Haiku detects your layout and writes ahaiku.yml. - Run. Use
vendor/bin/haiku lint,vendor/bin/haiku fix, orvendor/bin/haiku build. Wire it into pre-commit, CI, or your editor.
For detailed command usage, available options, and more examples, see docs/usage.md.
# Configuration
See configuration file documentation or AdBlockID-src/haiku.yml for a production configuration example.
Contributing
Contributions are welcome! Please:
- Fork the repo and create a feature branch.
- Add tests for new features.
- Ensure code passes
composer check. - Submit a PR with a clear description.
Report bugs or suggest features via Issues.
License
This project is licensed under the MIT License.