Beacon is a local repository indexing and querying tool extracted from Orchestra's search architecture and generalized so it can be used in any repository.
It keeps the repository itself authoritative and builds a disposable SQLite read model under .beacon/.
repository filesystem
↓
beacon index
↓
.beacon/search.sqlite3
filesystem graph + FTS5
↓
single query / batch queries
↓
ranked BM25 results + optional JSON exports
reindex is intentionally cheap and destructive to the search database. The index is a projection, not repository authority.
From this package:
python -m pip install -e .Or install PDF body-text support too:
python -m pip install -e '.[pdf]'Then enter any repository and use beacon.
cd /path/to/repository
beacon indexThe database is created at:
.beacon/search.sqlite3
Add .beacon/ to the repository's .gitignore.
beacon query canonical authority
beacon query '"canonical authority"'
beacon query '"canonical authority" template'The query semantics intentionally preserve Orchestra's behavior:
- natural-language scaffolding/stop words are removed from unquoted terms;
- unquoted terms are broad OR-prefix terms;
- quoted phrases require the same normalized words together and in order;
- mixed queries require every quoted phrase and at least one broad term;
- ranking uses SQLite FTS5 BM25;
- lower BM25 values rank first;
- path, filename, and body use Orchestra's
3.5 / 5.0 / 1.0BM25 weighting.
Portable JSON:
beacon query research evidence --json
beacon query research evidence --exportExports are written under .beacon/search-exports/ by default.
From a file:
beacon batch --file queries.txtInline:
beacon batch --queries 'prompt template, skill standard, "canonical authority"'Multiline input uses one query per line and preserves ordinary commas. Single-line input allows comma-separated queries. Quoted commas remain inside their query. Order and duplicates are preserved. Every query gets its own JSON export, including zero-match queries.
Beacon indexes every filesystem node by path and name. Body indexing supports:
- common text/source/config/data formats;
- Jupyter notebooks;
- DOCX, XLSX, PPTX;
- ODT, ODS, ODP;
- ZIP member names and bounded text members;
- PDF text when optional
pypdfsupport is installed.
Unsupported binaries remain searchable by path/name.
Beacon always ignores its own .beacon/ directory, Git metadata, common IDE/cache directories, and node_modules.
Optional repository-local .beaconignore rules can exclude additional paths. The format is intentionally small and gitignore-like: blank lines/comments are ignored, ! negates a prior match, trailing / means directory-only, and shell globs are accepted.
Run against another repository without changing directories:
beacon --root /path/to/repo index
beacon --root /path/to/repo query template authoritybeacon status
beacon status --jsonBeacon preserves the reusable core of Orchestra's indexing/query system:
- disposable local SQLite index;
- filesystem node graph;
- FTS5
porter unicode61tokenization; - natural-language stop-word filtering;
- broad prefix search;
- strict normalized quoted phrases with post-filtering;
- BM25 ranking and bounded snippets;
- single-query export contract;
- sequential batch execution with shared batch metadata;
- zero-match export support;
- atomic export writes.
Orchestra-specific phase/branch/version coordinates, related archived-interaction expansion, role/workflow state, Workbench attachments, and .project-handoff coupling are intentionally absent.