npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

claude-code-search

v1.3.0

Published

Interactive TUI for searching Claude Code, Codex, and Cursor prompt history

Readme

Claude Code Search

Fuzzy-search prompts from Claude Code, Codex, and Cursor, then copy one back to your clipboard

Like fzf or atuin, but for the prompts buried across your past sessions.

ccs searching a prompt history

Install

npm install -g claude-code-search

Requires Node.js 24.11 or newer.

Quickstart

ccs

ccs opens on the current directory so the first paint is not a full-history scan. Ctrl+R (or Shift+Tab) switches to every project. Type to filter. Results rank by match quality rather than date, the preview pane shows the full prompt, and Enter copies the selected prompt to your clipboard and prints it to stdout.

The same search runs non-interactively (stdout is data, stderr is logs):

ccs -s "refactor"
ccs -l -n 50
ccs -s "refactor" -j
ccs --source claude --source codex -s "test" --output json
ccs schema

Options

| Flag | Default | Description | | ---- | ------- | ----------- | | -l, --list | | List prompts and exit, no TUI | | -s, --search <query> | | Search for a query and exit, no TUI | | -j, --json | | Alias for --output json | | --output <text\|json> | text | Machine-readable JSON or text lines | | --no-input | | Never prompt (agents / pipes) | | -n, --limit <n> | 100 | Maximum number of results | | -p, --project <path> | | Only prompts from one project path | | --source <source> | all | claude, codex, cursor, or all (repeatable) | | --projects-dir <dir> | ~/.claude/projects | Claude projects directory |

Keyboard shortcuts

| Key | Action | | --- | ------ | | ↑ / ↓ | Move through results | | 1 to 9 | Jump straight to a result and copy it | | Enter | Copy the selected prompt and exit | | Ctrl+R / Shift+Tab | Toggle global or current-directory only | | Esc / Ctrl+C | Quit |

Sources

History is read only. Formats change between product versions; unknown records are skipped.

  • Claude Code: ~/.claude/projects/ (and ~/.config/claude/projects if present). Root <uuid>.jsonl transcripts; nested subagents/ files are ignored so the same prompt is not indexed twice.
  • Codex CLI: ~/.codex/sessions/**/rollout-*.jsonl and archived_sessions. Compressed .jsonl.zst files are skipped. Directory-scoped loads use rg when it is on PATH to find matching session files instead of opening every rollout.
  • Cursor: local state.vscdb (Composer headers + user bubbles). Cursor 3.x uses a global composerHeaders table. Mixed-source and TUI runs scope Cursor to the current workspace so the multi-gigabyte global DB is not fully loaded. --source cursor with no project filter reads all workspaces (slow).

Agent skill

# from this repo
# copy skills/ccs/SKILL.md into your agent's skills directory

See skills/ccs/SKILL.md.

Library

import { loadMessages, search, run } from "claude-code-search";

Exit codes

| Code | Meaning | | ---- | ------- | | 0 | Success | | 1 | General error | | 2 | Invalid arguments | | 3 | No results found |

Notes

  • Colour follows NO_COLOR and FORCE_COLOR, and drops out when stdout is not a terminal.
  • CCS_PROJECT_DIR overrides the Claude projects directory (--projects-dir wins).

License

MIT


Crafted by Matthew Blode