realodix / haiku
A tool to manage and maintain Adblock filter lists.
Installs: 822
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/realodix/haiku
Requires
- php: ^8.4
- illuminate/container: ^12.45
- illuminate/support: ^12.45
- nette/schema: ^1.3
- symfony/console: ^8.0
- symfony/filesystem: ^8.0
- symfony/finder: ^8.0
- symfony/yaml: ^8.0
Requires (Dev)
- mockery/mockery: ^1.6
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^12.5
- realodix/relax: ^1.20
- dev-main / 1.x-dev
- v1.9.0
- v1.8.1
- v1.8.0
- v1.7.2
- v1.7.1
- v1.7.0
- v1.6.0
- v1.5.0
- v1.4.0
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.0
- v1.1.1
- v1.1.0
- v1.0.0
- dev-global
- dev-keep-empty-lines
- dev-docs/usage.md
- dev-docs-config
- dev-wrong-domain-separator-
- dev-domain-wildcard-duplicates
- dev-feat-x
- dev-docss
- dev-docx
- dev-docsss
- dev-net-opt-combiner
- dev-composer-hash
- dev-lowercase-optionname
This package is auto-updated.
Last update: 2026-02-04 11:13:51 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.
Features
- Building: Compiles multiple filter list sources (local files and/or remote URLs) into single unified output files, including regenerating headers metadata and removing unnecessary lines such as comments.
- Fixing: Sort, combine, and normalize ad-blocking filter lists to make a cleaner and easier-to-maintain filter list. Supports multiple adblock syntaxes (Adblock Plus, AdGuard, uBlock Origin, and others).
- Unified Caching System: Automatically skips unchanged inputs for significantly faster subsequent runs.
- Configuration via YAML: Control both building and fixing behavior through a single
haiku.ymlfile.
The following example shows Haiku that normalizes the order and combines compatible rules.
!## BEFORE [$path=/page.html,domain=b.com|a.com]##.textad example.com##+js(aopw, Fingerprint2) -banner-$image,domain=example.org -banner-$image,domain=example.com b.com,a.com##.ads !## AFTER -banner-$image,domain=example.com|example.org a.com,b.com##.ads [$domain=a.com|b.com,path=/page.html]##.textad example.com##+js(aopw, Fingerprint2)
For a complete list of transformations, see docs/fixer-feature.md.
Installation
Install the package via Composer:
composer require realodix/haiku
Composer will install Haiku executable in its bin-dir which defaults to vendor/bin.
Commands
Initialize configuration
Creates a haiku.yml configuration file in your project.
vendor/bin/haiku init
Fixer
Sorting, combining, and optimizing adblock filter lists.
vendor/bin/haiku fix
Builder
Compiling filter lists from multiple source into consolidated output files.
vendor/bin/haiku build
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.