Skip to content

Fast CLI to search across all Claude Code session history

License

Notifications You must be signed in to change notification settings

sinzin91/search-sessions

Repository files navigation

search-sessions

search-sessions

CI Crates.io Release skills.sh License: MIT

Search across all your Claude Code and OpenClaw session history. Fast.

Why?

Claude Code forgets. After a few sessions, you've lost context — that clever regex, the architecture decision, the API you debugged at 2am.

Your session history is still there, buried in ~/.claude/projects/. But good luck finding anything in 1.6GB of JSONL files.

search-sessions fixes that. One binary. No indexing step. No database. Sub-second search across everything.

Each result includes the session UUID — so you can find and resume any past conversation:

❯ search-sessions "auth refactor"

  [1] auth refactor discussion
      Project:  ~/Projects/myapp
      Date:     2026-01-28 15:30
      Session:  7897c935-2069-4b75-bbad-a3fac62ea59c
      Resume:   cd ~/Projects/myapp && claude -r 7897c935-2069-4b75-bbad-a3fac62ea59c

Just copy-paste the Resume command to pick up where you left off.

Quick Start

For Claude Code users — paste this into any session:

Set up https://github.com/sinzin91/search-sessions as a /search-sessions skill.

Claude reads the docs and handles install + setup. Then just ask to search your sessions.

Manual Install

# Homebrew (macOS/Linux)
brew install sinzin91/tap/search-sessions

# Cargo (Rust)
cargo install search-sessions

See docs/install.md for detailed instructions.

Optional: Want your agent to search history when asked "do you remember..."? Paste this:

Update your relevant files to use search-sessions when asked to remember or recall information.

Usage

This is a tool meant to be used by your agent.

# Index search (instant, searches metadata)
search-sessions "kubernetes RBAC"

# Deep search (searches full message content)
search-sessions "docker compose" --deep

# Filter by project
search-sessions "auth" --project myapp

Speed

Mode Time
Index search 18 ms
Deep search (with ripgrep) 280 ms
Deep search (Rust fallback) ~1 s

No dependencies required. Install ripgrep for 3-5x faster deep search.

Built for Claude, not around it

Other tools give you a separate TUI or CLI to learn. This one works inside Claude — just ask:

"search my sessions for that kubernetes RBAC discussion"

No commands to memorize. No context switching.

Comparison

Tool Speed Dependencies Native to Claude
search-sessions 280ms None ✅ Slash command
cc-conversation-search ~500ms Python + SQLite
claude-history ~400ms Rust ❌ TUI only
aichat claude-code-tools ~300ms Python + Tantivy

OpenClaw Support

Also searches OpenClaw agent sessions with --openclaw. See docs/openclaw.md.

Docs

License

MIT

About

Fast CLI to search across all Claude Code session history

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages