# source-map-php > source-map-php is a Rust CLI for building an LLM-friendly code index from Laravel and Hyperf repositories. It extracts source-code metadata, drops strings that look like secrets or personal data, stores the rest in Meilisearch, and searches from the command line. It is not a production data search engine. Landing page: https://source-map-php.lifefarmer.ca. Source: https://github.com/dickwu/source-map-php. ## Key facts - Version: 0.1.3 (crate and Homebrew formula) - License: MIT - Homepage listed on the formula: https://github.com/dickwu/source-map-php - Crate docs: https://docs.rs/source-map-php - Crate: https://crates.io/crates/source-map-php - Catalog: https://lifefarmer.ca - CI builds and tests on Linux and macOS - Tagged CI builds target `x86_64-unknown-linux-gnu` and `aarch64-apple-darwin` - No always-on app server ## Install Documented in the project README: ``` brew tap dickwu/tap brew install source-map-php ``` The same formula, by its full Homebrew name: ``` brew install dickwu/tap/source-map-php ``` Also: ``` cargo install source-map-php ``` The Homebrew formula depends on Rust at build time and installs the `source-map-php` and `phpantom_lsp` binaries. `phpantom_lsp` is a stdio language server for document symbols, definitions, and references, using the fallback PHP parser. ## Requirements The README lists these build requirements: Rust, PHP 8.3+, Composer, and Meilisearch. Phpactor on `PATH` is recommended for extraction quality. `doctor` expects Phpactor even though extraction can fall back. ## Commands `init`, `doctor`, `index`, `search`, `remove`, `validate`, `verify`, `promote`. `index` takes `--framework auto|laravel|hyperf` and `--mode clean|staged`. `search` takes `--index all|symbols|routes|tests|packages|schema`. Omit `--index` to search every saved index type and print grouped results. `--project` accepts a saved project name or the full repository path. `search` and `validate` accept `--json`. Meilisearch host order: `MEILI_HOST`, then `meilisearch.host` in `config/indexer.toml` when you override the default, then `~/.config/meilisearch/connect.json`, then `http://127.0.0.1:7700`. API key order: `MEILI_MASTER_KEY` by default, or the env var named by `meilisearch.master_key_env`, then `~/.config/meilisearch/connect.json`. ## Safety Indexed material is source-code metadata: symbols, routes, tests, package ownership, schema hints, comments, and PHPDoc. Before strings are stored, the sanitizer drops values that look like API keys, JWTs, private keys, passwords and DSNs, email addresses, phone numbers, long numeric IDs, date-of-birth-like strings, and medical-record-style identifiers. ## Limits Working baseline. Hyperf route extraction still needs hardening for large repos, mixed encodings, and route organization. `doctor` expects Phpactor. Live Meilisearch indexing is not covered end to end in CI. The README still lists a first tagged binary release, multiline fallback signatures, `config/routers/*.php` route trees, and live Meilisearch coverage as next work. ## Links - [Landing page](https://source-map-php.lifefarmer.ca/) - [Source](https://github.com/dickwu/source-map-php) - [README](https://github.com/dickwu/source-map-php/blob/main/README.md) - [Homebrew formula](https://github.com/dickwu/homebrew-tap/blob/main/Formula/source-map-php.rb) - [Crate docs](https://docs.rs/source-map-php) - [Catalog](https://lifefarmer.ca)