README.md
August 2, 2026 · View on GitHub

Compare fast. Search in memory. Spotlight documents. Aggregate collections.
Glyph turns text into glyphs (fixed-size signatures). You can compare two glyphs, build an in-memory index and query it for ranked matches, use spotlight to rank chunks inside a document, or use completions for glyph-guided next-word suggestions.

| Doc | Purpose |
|---|---|
| Getting started | Install, first compare, mental model |
| Building an index | Populate an index and run a query |
| Your first completion | Ingest docs and suggest the next word |
| Your first collection | Aggregate labeled glyphs into one probe |
| Your first spotlight | Chunk a document and rank snippets |
| Demo CLI | Compare, search, complete, and spotlight from the terminal |
| API surface | Full export list (Core + Query + Collections + Completions + Spotlight) |
| Migration 0.4 → 1.0 | PascalCase API and query.New changes |
Doc pages end with a Related section (3–5 links, ranked by Glyph). Regenerate after editing docs: npm run docs:related.

| Doc | Topic |
|---|---|
| Glyph | Types: Glyph, GlyphRecord, GlyphSignature |
| Create | Create() and fingerprint options |
| Compare | Compare(), CompareGlyphs(), results |
| Groups | GlyphGroup, CreateGroup(), aggregate compare |
| Serialize | Serialize(), Deserialize(), string formats |
| Tokenize | Tokens, unigrams, vgrams |
| Text normalization | TextFilter, TextStrip |
| Index | index.New(), bands (default) or direct store |

| Doc | Topic |
|---|---|
| Query | query.New(idx).Search() ranked search |
| Query options | limit, threshold, normalize, aggregate |
| Query results | GlyphQueryResult shape |

| Doc | Topic |
|---|---|
| Collections | collections.New(), keyed glyphs + glyph |
| Your first collection | Tutorial: aggregate and query |
| Aggregators | Slot-wise CollectionAggregator built-ins |

| Doc | Topic |
|---|---|
| Chain | completions.New(), Ingest, storage |
| Complete | Complete() ranked next-word suggestions |
| Completion options | order, create, limit, minCount |
| Completion results | GlyphCompletionResult shape |

| Doc | Topic |
|---|---|
| Your first spotlight | Tutorial: chunk, Rank, Query |
| Document | spotlight.New(), chunk and fingerprint |
| Rank | document.Rank() score all chunks |
| Query | document.Query() threshold + limit |
Limits (current version)
| Feature | Status |
|---|---|
| In-memory index | Implemented |
| LSH banding index (default) | Implemented |
Direct (exact) scan via mode: "direct" | Implemented |
| Collections (slot-wise glyph aggregate) | Implemented |
| Glyph completions (Markov + rank) | Implemented |
| Spotlight (document chunk rank/query) | Implemented |
| Disk persistence | Planned post-1.0 |
| Chain persistence | Planned post-1.0 |
License
Mozilla Public License 2.0 — see LICENCE.