Like fzf or atuin, but for your Claude Code prompts.
Your best prompts are buried across dozens of Claude Code sessions. This tool lets you instantly search and reuse them instead of rewriting from scratch.
npm install -g claude-code-searchccs # Launch interactive TUI
ccs -l # List recent prompts
ccs -s "refactor" # Search for "refactor"
ccs -l -j # Output as JSON
ccs -l -n 50 # List last 50 prompts
ccs -p /path/to/proj # Filter by project pathSelect a prompt and it's copied to your clipboard, ready to paste.
Extract insights from your prompt history:
ccs -l | claude "what patterns do you see in how I prompt?"
ccs -s "refactor" -j | claude "summarize these prompts"- Fuzzy search - Find prompts by any words they contain
- Relevance ranking - Results sorted by match quality, not just date
- Split-pane preview - See full content before selecting
- Quick jump - Press 1-9 to instantly select
- Filter modes - Search globally or within current directory
- Non-interactive mode - Use with
-lor-sfor scripting - Color support - Respects
NO_COLORandFORCE_COLOR
Options:
-l, --list List all prompts (non-interactive)
-s, --search <query> Search prompts with query (non-interactive)
-j, --json Output as JSON (use with -l or -s)
-n, --limit <n> Limit number of results (default: 100)
-p, --project <path> Filter by project path
--projects-dir <dir> Projects directory (default: ~/.claude/projects)
-v, --version Show version number
-h, --help Show help
By default, ccs reads from ~/.claude/projects/. You can override this to use a different location (e.g., a synced backup):
CLI flag (highest precedence):
ccs --projects-dir ~/backup/claude/projectsEnvironment variable:
export CCS_PROJECT_DIR=~/backup/claude/projects
ccsThe CLI flag takes precedence over the environment variable.
| Key | Action |
|---|---|
↑ / ↓ or j / k |
Navigate results |
1-9 |
Quick jump to result |
Enter |
Copy & exit |
Ctrl+R / Shift+Tab |
Toggle global/directory filter |
Esc / Ctrl+C |
Quit |
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Invalid arguments |
| 3 | No results found |
- Node.js >= 18
- Claude Code session data (defaults to
~/.claude/projects/, configurable via--projects-dirorCCS_PROJECT_DIR)
MIT - Matthew Blode
