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-history-search

v0.1.2

Published

Local semantic search over your Claude Code session history

Readme

Claude Code History Search (cch)

A local CLI intelligence layer for Claude Code sessions. Provides asynchronous background indexing, file archiving, and semantic hybrid search over your Claude Code history.

Architecture

~/.claude/projects/
      ↓
  [Daemon Watcher] (chokidar) ━━━━> [Archiver] ━━> ~/.cc-memory/archive/
      ↓
  [Indexer / Parser]  (better-sqlite3)
      ↓    [vec0 / FTS5]
  ~/.cc-memory/index.db
      ↓
  [Hybrid Query CLI]
      ↑
   cch ask

Quick Start

  1. Install globally: npm install -g claude-history-search
  2. Start the daemon (runs background indexing and archiver): cch daemon start
  3. Ask your semantic queries: cch ask "how did we fix the react router auth bug?"

CLI Commands

  • cch daemon start: Start the background watcher/indexer daemon.
  • cch daemon stop: Stop the background daemon.
  • cch daemon status: Shows heartbeat and PID if running.
  • cch ask <query>: Natural language search against all tracked exchanges using hybrid Cosine Similarity + BM25 ranking. Use --no-content to print only metadata (project, date, score, session ID) without conversation text.

    Privacy note: ask prints conversation content to stdout. Do not pipe output to shared logs or public channels.

  • cch search <query>: Lighter session-level semantic search.
  • cch status: Print index sizing metrics (total sessions, exchanges tracked).
  • cch archive --now: Force immediate sweep and archive of expiring session files.
  • cch index --reset: Stop the daemon, wipe the local DB, and require restart.
  • cch index --rebuild-fts: Rebuild the FTS5 keyword index (use if keyword search returns stale results).
  • cch config: Open configuration settings in $EDITOR.

Config Options

Configurations are saved in ~/.cc-memory/config.json.

  • embeddingModel: "local" (default). Note: "openai" is listed as a future option but is not yet implemented.
  • archiveIntervalHours: Archiver routine timer (default: 6).
  • archiveWarningGb: Max folder size before warnings emit (default: 2).
  • searchResultCount: Number of results returned by ask and search (default: 5).
  • vectorWeight: Weight for vector similarity in hybrid search, between 0 and 1 (default: 0.6). The keyword weight is 1 - vectorWeight.

Note: Index freshness warnings and detailed health checks in cch status (e.g., stale index detection, embedding model availability, archive staleness) are planned for a future release.