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.
Built with a deep understanding of the syntaxes of Adblock Plus, AdGuard, and uBlock Origin.
Analyze your filter lists to perform intelligent redundancy analysis, while catching syntax errors and invalid options or modifiers before they affect users.
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_transformations.md.
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.
-
Install. Install the package via Composer
composer require realodix/haiku
-
Initialize. Run
vendor/bin/haiku initin your project root. The command writes ahaiku.ymlconfiguration file. -
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.
See configuration file documentation or AdBlockID-src/haiku.yml for a production configuration example.
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.
This project is licensed under the MIT License.