Download the PHP package commonform/trawl without Composer
On this page you can find all versions of the php package commonform/trawl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download commonform/trawl
More information about commonform/trawl
Files in commonform/trawl
Package trawl
Short Description PHP-native build-time full-text search indexer with a dependency-free JS query runtime
License MPL-2.0
Homepage https://github.com/commonformhq/trawl
Informations about the package trawl
Trawl
PHP-native build-time full-text search indexer with a dependency-free JavaScript query runtime. No Node, no server-side query API, no Elasticsearch — index at build time, query in the browser.
Why Trawl?
Trawl fills a specific gap: PHP shops that want client-side full-text search without adding Node to their toolchain.
| Trawl | Pagefind | Hosted (Algolia, etc.) | |
|---|---|---|---|
| Indexer runtime | PHP (Composer) | Node/npx | SaaS |
| Search runtime | Browser-only JS | Browser-only JS | Server API |
| Node dependency | None | Required for indexing | None |
| Composer install | composer require --dev |
N/A | N/A |
| Chunked index | Yes (CRC32 shards) | Yes | N/A |
| On-premise | Fully self-contained | Fully self-contained | Third-party |
If you already have Node in your build pipeline, Pagefind is excellent and more mature. If you don't, or you want your entire dev dependency tree in Composer, Trawl is your option.
Quickstart
Then in your HTML:
Copy runtime/trawl.js from the package into your public directory, or use it directly from vendor/commonform/trawl/runtime/trawl.js.
CLI Commands
Build
Verify
Configuration (trawl.json)
Adapters
| Adapter | Input | Description |
|---|---|---|
filesystem |
.html files |
Walks a directory of rendered HTML, extracts content via CSS selectors |
markdown |
.md / .mdx files |
Parses YAML frontmatter + Markdown body via league/commonmark |
array |
iterable<Document> |
Programmatic input from CMS integrations |
JS Runtime API
Requirements
- Indexer: PHP 8.3+, Composer
- Runtime: Any browser with native
fetch, ES modules, andURL
License
MPL-2.0
All versions of trawl with dependencies
ext-json Version *
ext-dom Version *
ext-libxml Version *
symfony/console Version ^7.0
symfony/dom-crawler Version ^7.0
symfony/css-selector Version ^7.0
symfony/finder Version ^7.0
symfony/yaml Version ^7.0
league/commonmark Version ^2.5