Community Tool: ccs — Fast CLI for searching Claude Code session transcripts
Resolved 💬 3 comments Opened Mar 30, 2026 by ignaciomella Closed Apr 3, 2026
I built a small CLI tool to search across Claude Code session history — something I've wanted since #6912 was filed.
What it does
ccs (Claude Code Session Search) searches your .jsonl session files using ripgrep + Python:
ccs "RabbitMQ" # search all sessions
ccs "backup script" --user # only in your messages
ccs "docker compose" --assistant # only in Claude's responses
ccs "webhook" --project my-app # filter by project
ccs "deploy" --since 2025-03-01 # date filter
Key features
- Fast — ripgrep for file-level matching (~70ms across 1000+ sessions / 2GB), then Python for structured filtering
- Smart
--userfilter — distinguishes actual human-typed messages from tool results (which are also stored astype: "user"records in the JSONL format) - Zero dependencies — Python stdlib only. Auto-detects ripgrep (system install or Claude Code's bundled binary via ARGV0 trick), falls back to grep
--verboseshowsclaude --resume <id>commands for each matching session--jsonfor programmatic output
Output example
5 matches in 3 sessions
2025-03-28 migrate-webpay-checkout [~/Sites/magento]
[claude] 01:46 ...RabbitMQ exchange recreation after fresh container start...
2025-03-20 switch-production-vulcan-to-leti [~/Sites/magento]
[you] 14:00 ...Redis, OpenSearch, and RabbitMQ connection settings should match...
Install
git clone https://github.com/ignaciomella/claude-session-search.git
ln -s "$(pwd)/claude-session-search/ccs" ~/.local/bin/ccs
Repo also includes a Claude Code skill definition for natural language queries ("search my sessions for where I mentioned X").
Sharing in case others find it useful. Feedback welcome!
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗