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

rewound

v0.4.2

Published

Grep for everything your AI coding agents ever did. Local SQLite/FTS5 search over Claude Code session transcripts: CLI, MCP server, and web UI.

Readme

rewound

Grep for everything your AI coding agents ever did.

The problem

Heavy users of coding agents accumulate gigabytes of session transcripts that are effectively write-only memory:

  • No search. Claude Code and Codex CLI have no cross-session full-text search. Finding "the session where we fixed the auth bug" means manual archaeology through JSONL files.
  • History is perishable. Claude Code deletes transcripts older than 30 days by default (cleanupPeriodDays, swept at startup) — your reasoning history evaporates.
  • Agents can't remember. Every new session rediscovers what a previous session already solved. Nobody serves the agent itself.

rewound indexes every session transcript on your machine — Claude Code and OpenAI Codex CLI today, more harnesses next — into a local SQLite/FTS5 database and exposes it three ways: a CLI, an MCP server your agents can query directly, and a phone-friendly local web UI. Everything runs on your machine. Nothing leaves it.

60-second demo

$ rewound index
files scanned: 3310  new: 3310  updated: 0
messages indexed: 368687  parse errors: 1
elapsed: 29962ms

$ rewound search "fts5 trigger bug"
/home/dev/myapp · Fix fts5 trigger bug · 2026-07-01T10:00:05.000Z
found and fixed the **fts5** **trigger** bug by rewriting the AFTER UPDATE **trigger**
  ↳ resume: claude --resume 3f1a2c9e-...

(1 hit in 5ms)

Those numbers are real, from indexing a working machine's actual Claude Code history: 3,310 session files / 2+ GB / 368,687 messages, cold-indexed in 30 seconds (target was 5 minutes), incremental re-index in 148ms (target 5s), search in single-digit milliseconds (target 100ms).

Search results — grouped per session, prose ranked above tool output

Your own words rank above tool output that merely mentions the term, results are grouped one-per-session (+N more in this session), and every hit carries a one-tap resume command. More recall stories in docs/use-cases.md.

Session transcript view Stats — est. API cost per project Phone-friendly over your tailnet

Install

npm install -g rewound
rewound index

Or with Homebrew: brew install dashorama/tap/rewound. Or without installing anything: npx rewound index. Node 20+ required. The CLI is also installed as rw — same commands, fewer keystrokes (rw search "auth bug").

git clone <this-repo> && cd rewound
npm install
npm run build
node dist/cli.js index          # or: npm link, then `rewound index`

By default rewound reads ~/.claude/projects/**/*.jsonl and Codex CLI sessions from ~/.codex/sessions (read-only — it never modifies your transcripts) and writes its own database to ~/.rewound/rewound.db. Override the DB path with --db <path> or REWOUND_DB=<path>.

Multi-machine: your history follows you

If you work across machines, two commands per machine give you one merged history with zero servers involved:

rewound sync ~/GoogleDrive/rewound   # once: any folder your machines already share
rewound auto --install               # keeps index + sync fresh via cron, hourly

That's the whole setup. The folder is remembered after the first run — from then on bare rewound sync (and the cron entry rewound auto installs) just works. Any shared folder qualifies: Google Drive, Dropbox, Syncthing, a private git repo you pull/push, a mounted NAS.

How it works: each machine writes its own snapshot (<hostname>.rewound.db) into the folder and merges everyone else's — the richer copy of a session wins and repeat runs are no-ops. Because every host only ever writes its own file, eventually-consistent syncers like Drive and Dropbox never see write conflicts. rewound merge <file.db> is the underlying primitive if you'd rather move snapshots by hand (scp, USB stick).

No shared folder? Using object storage (S3, Supabase Storage, R2...)? The easy road is still any file-sync client. If you'd rather use a bucket, wrap the sync in two rclone copies (Supabase Storage is S3-compatible — create S3 access keys in project settings → Storage, then rclone config an S3 remote with your project's storage endpoint):

rclone copy bucket:rewound ~/.rewound/sync   # pull other machines' snapshots
rewound sync ~/.rewound/sync                 # merge + write this machine's snapshot
rclone copy ~/.rewound/sync bucket:rewound   # push

Put those three lines in cron and it's just as automatic — no mounts needed.

Privacy stance unchanged: rewound itself never opens a network connection — you choose the transport, and your data only ever lands on storage you control.

Your history outlives Claude Code's cleanup

Claude Code deletes transcripts older than ~30 days at startup. rewound's index is permanent: once a session is indexed, it stays searchable even after the source file is gone (it's kept as an archived session). Anything from before you started indexing is already unrecoverable — so the best moment to run rewound index is now, and then let rewound auto --install keep it fresh hourly. Incremental runs take well under a second when little has changed.

The surfaces

CLI — available now

rewound index [--roots <dir...>] [--db <path>] [--json]
rewound search <query> [--project <substr>] [--since <ISO|7d|24h>] [--role user|assistant] [--sidechains] [--limit N] [--json]
rewound sessions [--project <substr>] [--limit N] [--json]
rewound show <session-id-or-prefix> [--json]
rewound stats [--json]

search supports relative time windows (--since 7d), project filtering, and role filtering. Query terms are quoted automatically so punctuation never throws an FTS syntax error; pass --raw if you want real FTS5 query syntax.

Results are built to be scanned by a human eye: your own words and the agent's prose rank above tool output that merely mentions the term (a cat of a file no longer buries the sentence where you actually discussed the bug), and each session appears once — its best hit plus a +N more matches in this session count. Pass --all-matches to disassemble a session into every matching message.

Two search tips from real-corpus testing: scope with --project when your memory is project-specific — cross-cutting terms (preferences, conventions, tool names) appear in every project's sessions and will drown an unscoped query. And run rewound index before hunting for recent work; indexing is incremental and takes well under a second when little has changed.

MCP server — available now

rewound mcp starts a stdio MCP server so a Claude Code agent can search its own history mid-session — the moat feature. Three tools:

  • search_history({query, project?, since?, limit?, all_matches?}) — ranked excerpts (≤700 chars each) with session id/title/date, one best hit per session by default, and a hint to fetch more context.
  • get_session_summary({session_id}) — title, project, dates, message count, tools/models used, first prompt and last response (truncated).
  • get_session_excerpt({session_id, match_uuid?, context?}) — the matched message plus surrounding context, readable.

Every response is capped near 8KB so agent context isn't blown out by a single tool call. Add it to your Claude Code MCP config:

{ "mcpServers": { "rewound": { "command": "npx", "args": ["-y", "rewound", "mcp"] } } }

(Running from a source checkout instead? Point command/args at your local build, e.g. "command": "node", "args": ["/path/to/rewound/dist/cli.js", "mcp"].)

Web UI — available now

rewound serve starts a local, phone-friendly web UI: full-text search with filters, readable session transcripts with one-tap resume-command copy, per-project timeline, and cost rollups.

rewound serve                  # http://127.0.0.1:4321
rewound serve --host 0.0.0.0   # reachable over Tailscale — search your history from your phone

Server-rendered with zero frontend build step, colorblind-safe palette (blue/orange, no red/green status pairs), and everything — including clipboard copy — works over plain HTTP on your tailnet.

Privacy

100% local. No telemetry, no network calls, no account. Your transcripts never leave your machine — rewound reads ~/.claude/projects read-only and writes its own database to ~/.rewound/rewound.db. Even "archive mode" (kept history after Claude Code prunes the source file) lives entirely in your local SQLite file.

Cost estimates

rewound stats and search results include an estimated cost per session, computed from a static $/Mtok table (updated by hand, not live pricing). Treat it as a rough API-equivalent value, not a bill.

Roadmap

More harness adapters are next: Copilot CLI and OpenCode transcripts are already mapped (see repo issues/roadmap). Keyword-first search is deliberate for v0.x — it's fast, local, and predictable. Local hybrid/semantic search (vector index built with a local embedding model, no API keys, fused with FTS ranking) is planned once the keyword surface has proven itself; the gap it closes is vocabulary mismatch ("that time the port was already taken" vs EADDRINUSE).

License & pricing

Source-available; free for personal use. Commercial/team use requires a paid license: $29 individual · $99 team (up to 10 seats) — one-time, per major version. v0.x ships with no license-key enforcement; buying a license is how you comply, and how you keep this maintained. See LICENSE.