Fast full-text search across your AI coding conversations. Searches Claude Code, Codex, and Cursor session histories locally.
Built in Rust. Trigram index with memory-mapped I/O for sub-millisecond indexed searches. Falls back to parallel full-text scan when no index is available.
cargo build --release
cp target/release/srch ~/.local/bin/srch --index # build trigram index (run once, re-run to update)
srch "orderbook" # search all conversations
srch -r "auth.*token" # regex search
srch -f user "river effect" # only your messages
srch -f assistant "implementation" # only AI responses
srch -t claude "river" # claude conversations only
srch -t codex "documentation" # codex conversations only
srch -t cursor "perpetual" # cursor conversations only
srch -p 3dbook "orderbook" # filter by project name
srch -l 20 "query" # 20 results per page (default 10)
srch --plain "query" # non-interactive output (for pipes) --index Build/rebuild the trigram search index
-r, --regex Treat query as regex pattern
-f, --from <FROM> Filter by sender: user, assistant, all, both [default: both]
-t, --tool <TOOL> Filter by tool: claude, codex, cursor (default: all)
-p, --project <PROJECT> Filter by project name (substring match)
-l, --limit <LIMIT> Page size for results [default: 10]
--plain Plain output (no interactive mode)
Run srch --index to build a trigram index at ~/.cache/srch/trigram.idx. This is a flat binary file designed for memory-mapped access — no deserialization overhead on query.
srch --index # builds index (~5s for 250 sessions, ~37 MB)
srch "query" # uses index automatically (sub-ms for most queries)
The index stores pre-lowercased text with a trigram lookup table for O(candidates) search instead of O(all entries). If the index is stale (source files modified after index), srch falls back to live search automatically. Re-run --index to update.
Default when running in a terminal. Arrow keys to navigate, Enter to open full conversation context, q to quit.
▸ claude:3dbook • 2026-03-15 16:59 • YOU
...can we move the left or right based on the mid price to create a river effect?
codex:docs • 2026-03-25 09:50 • CODEX
Build and maintain documentation sites with Mintlify.
Found 17 matches across 31 projects (251 sessions in 0ms)
↑↓ navigate • Enter open • q quit
Press Enter on any result to see the full conversation around that message. Scroll with arrow keys, q to go back.
| Tool | Location | Sessions |
|---|---|---|
| Claude Code | ~/.claude/projects/**/*.jsonl |
per-project |
| Codex | ~/.codex/sessions/**/*.jsonl |
date-based |
| Cursor | ~/.cursor/projects/*/agent-transcripts/**/*.jsonl |
per-project |
- YOU (green) — your messages
- CLAUDE (blue) — Claude responses
- CODEX (magenta) — Codex responses
- CURSOR (cyan) — Cursor responses
- TOOL (yellow) — tool calls (visible with
-f all)