Holdfast Labs

wgrep

Semantic and exact code search.
One local binary for you and your agents.

Linux, macOS, Windows · MIT

Recorded terminal sessions at 1x; the initial index build is omitted.Use fullscreen for a closer look.

Ask by intent. Or match exact text.

Semantic search ranks code chunks from a live index. A ripgrep flag switches to the exact engine inside the same binary.

  • wg "where do requests get validated": ranked shortlist.
  • wg -F "decodePacketV17" .: exact text, ripgrep 15.1.
  • wg up: attach a root and build both indexes.
  • wg status --json: roots, counts and health.
Semantic, the default
wg "where do incoming requests get validated" --top 3
Exact text, with a path
wg -F "decodePacketV17" .

Built for code that changes.

One watcher per root updates both indexes. An edit becomes searchable without a restart.

  1. Attach a root

    wg up indexes the nearest Git repository or the current directory.

  2. Choose the route

    Use semantic ranking for intent. Use -F or -e for literal or regex matching.

  3. Keep the daemon

    One daemon serves up to 32 attached roots with one shared model pool.

Semantic results are ranked, not exhaustive. A correct answer can fall outside the shortlist. The text index only removes impossible files, so common terms still scan much of the tree.

Faster on warm queries, edits, and rare terms.

Warm semantic query, p50: 25.2 ms for wgrep and 565.7 ms for the sgrep CLI. One-file edit to first correct result, p50: 99.2 ms for wgrep and 21.8 s for sgrep. Rare identifier text search, p50: 6.0 ms for wgrep and 63.8 ms for ripgrep 15.1, with byte-identical output under --sort path.

13,332 Rust files on a Debian 13 VPS with 4 vCPU. The three measures use different workloads.

Unpack. Attach. Search.

Download the archive for your platform, add bin to PATH, then attach a repository. The first wg up downloads about 56 MB of model and parser assets.

wg up
wg "where do requests get validated"