I built a local search CLI for my Claude Code history
2 points
1 hour ago
| 1 comment
| github.com
| HN
madzarm
1 hour ago
[-]
Hey everyone,

If you use Claude Code, you know the CLI is great until you need to find a conversation from three days ago. The default --resume flag just spits out a flat list of your last 20 sessions. You end up scrolling through truncated titles trying to guess which one was the "postgres connection bug."

I got annoyed enough by this to build ccsearch. It’s a Rust CLI that indexes your Claude Code history into a searchable TUI. You type what you vaguely remember, find the session, hit Enter, and it instantly runs claude --resume <id> to drop you right back into that exact context.

I originally tried just using grep/FTS, but it failed whenever I couldn't remember the exact error code or variable name I used. So I built a simple local hybrid search instead:

- SQLite FTS5 (BM25) for exact keyword matches. - A local embedding model (all-MiniLM-L6-v2) for semantic concept matching. - Reciprocal Rank Fusion (RRF) to merge the results.

The whole thing runs 100% locally on your machine. The model is tiny (80MB), and absolutely zero search data gets sent to the cloud. It's open source. I'd love for some Claude Code users to try it out.

reply