Repository navigation
v0.6.0
v0.6.0 — Exact grep semantics, token-efficient output, hierarchical ignore files
This release replaces the search engine and fixes two silent correctness bugs that could mislead AI agents, while cutting both memory usage and output token cost.
🔍 Search engine rewritten: exact grep semantics
The Bleve token-based engine had silent false negatives:
- substring queries inside identifiers returned nothing (
Mutexmissedsync.RWMutex) /regex/queries matched files but returned zero lines (the line extractor treated the pattern as a literal)- multi-word queries OR-ed tokens while the line matcher required the full string
Search is now a direct in-memory line scan compiled to a single RE2 matcher — results are grep-identical with full recall, and memory drops to roughly the corpus size (the Bleve dependency tree is gone).
Query formats:
| Format | Behavior |
|---|---|
plain text |
literal substring, case-insensitive |
"quoted" |
exact literal, case-sensitive |
/regex/ |
RE2 regular expression per line, case-insensitive by default |
🪙 Token-efficient output
- Overlapping match contexts merge into hunks (
N:= match,N-= context,--separator) — no more duplicated context lines maxMatchesPerFiledisplay cap (default 10) with... +N more matches- New
outputMode:content(default),files(paths only),count(paths + match counts) — usefiles/countwhen locations suffice contextLines: 0now works (was silently reset to 2)- New
caseSensitiveoption - Explicit notice when the file limit truncates results
📂 Hierarchical ignore files
Nested .gitignore / .claudeignore files at every directory level are now respected with git's precedence rule (closest file wins, negations included). Previously only the root files were loaded — monorepo subprojects leaked build output into the index.
.env.* and *.env are now ignored by default so secrets never enter the index (--force-include overrides intentionally).
🔄 Index consistency hardening
- Newly created directory trees (copy, unzip,
git checkout) are watched recursively and files already inside are indexed — closes a race where content written before the watch attached was never indexed - Periodic sync verification is on by default (every 300s,
--sync-interval 0disables) as a self-healing net .gitignore/.claudeignorechanges now re-sync the index (newly-ignored files dropped, newly-unignored indexed)
🛠 MCP improvements
- All read-only tools declare
readOnlyHintso clients can skip permission prompts codeindex_statusreports version, watched directory count, and sync interval- Tool descriptions document the new grep semantics and token-saving guidance
- Logging defaults to off (no log file unless
--log-enabled)
⬆️ Upgrading
Drop-in replacement — rebuild or download the new binary and restart your MCP client session. Tool parameters are backward compatible; the search output format changed (hunks with N:/N- markers).