https://github.com/mblode/claude-code-search
Search through your Claude Code history
https://github.com/mblode/claude-code-search
Last synced: 4 months ago
JSON representation
Search through your Claude Code history
- Host: GitHub
- URL: https://github.com/mblode/claude-code-search
- Owner: mblode
- License: mit
- Created: 2025-12-17T04:16:48.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-01-03T00:26:49.000Z (5 months ago)
- Last Synced: 2026-01-06T02:34:42.253Z (5 months ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/claude-code-search
- Size: 1.1 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ccs - Claude Code Search
[](https://www.npmjs.com/package/claude-code-search)
[](https://opensource.org/licenses/MIT)
Like [fzf](https://github.com/junegunn/fzf) or [atuin](https://github.com/atuinsh/atuin), but for your Claude Code prompts.

## Why?
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.
## Install
```bash
npm install -g claude-code-search
```
## Usage
```bash
ccs # 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 path
```
Select a prompt and it's copied to your clipboard, ready to paste.
### Pipe to Claude
Extract insights from your prompt history:
```bash
ccs -l | claude "what patterns do you see in how I prompt?"
ccs -s "refactor" -j | claude "summarize these prompts"
```
## Features
- **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 `-l` or `-s` for scripting
- **Color support** - Respects `NO_COLOR` and `FORCE_COLOR`
## CLI Options
```
Options:
-l, --list List all prompts (non-interactive)
-s, --search Search prompts with query (non-interactive)
-j, --json Output as JSON (use with -l or -s)
-n, --limit Limit number of results (default: 100)
-p, --project Filter by project path
-v, --version Show version number
-h, --help Show help
```
## Keyboard Shortcuts
| 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 |
## Exit Codes
| Code | Meaning |
|------|---------|
| 0 | Success |
| 1 | General error |
| 2 | Invalid arguments |
| 3 | No results found |
## Requirements
- Node.js >= 18
- Claude Code (reads from `~/.claude/projects/`)
## License
MIT - Matthew Blode