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

@z2r0/prompt-vault

v1.0.0

Published

A calm, developer-oriented prompt vault — hybrid search, multi-format copy, and zero-click ingestion of your local Codex & OpenCode history. Runs as a local app from the CLI.

Downloads

136

Readme

Prompt Vault

A calm, local-first prompt manager for developers.

Hybrid search · multi-format copy · zero-click ingestion of your Codex, OpenCode & Claude Code history — all on your machine, nothing leaves it.

npm node license: MIT local-first

Prompt Vault is a tiny, self-contained app you launch from the terminal. It stores your prompts, finds them by keyword and by meaning, and copies any of them in the exact format you need — with {{variable}} fill-ins. It can also read your prompts straight out of your local CLI-agent history, so the vault fills itself.

npx @z2r0/prompt-vault     # run it — no install

Features

  • 🔎 Hybrid search, fully offline. Real BM25 lexical ranking fused (Reciprocal Rank Fusion) with a local concept-vector semantic layer — no model download, no API key, no network. Toggle Hybrid / Keyword / Semantic; every hit shows keyword/meaning signal chips and a relevance bar. Searching "make my code run faster" surfaces "Optimize a slow SQL query" by meaning.
  • 📥 Zero-click history ingestion. On launch it quietly reads your Codex, OpenCode, and Claude Code history off disk and merges in anything new — keeping only your prompts (environment envelopes and assistant turns skipped) and tracing each back to the project it came from. Re-scan any time from Ingest.
  • 📋 Copy in four formats. Raw · Markdown · XML (<prompt>) · JSON, with {{variable}} fill-ins that flow into every format.
  • 🗂️ Stay organized. Pin to top, inline-edit, duplicate, archive, delete, live-edit tags, and sort by recent / most used / newest / A–Z.
  • 🔒 Local-first by design. Your vault lives in the browser (localStorage); the server only ever reads files on your machine. No account, no database, no telemetry.
  • 🌿 Calm, responsive UI. A warm, Anthropic-inspired light theme with a low-contrast dark mode, ⌘K search, and a layout that folds into drawers on narrow screens.

Install

# Run once, no install:
npx @z2r0/prompt-vault

# Or install it globally:
npm install -g @z2r0/prompt-vault
prompt-vault

Either way it starts a tiny local server on 127.0.0.1, prints the URL, and opens the app in your browser.

Usage

  1. Launch — run prompt-vault. The app opens and silently ingests any new prompts from your local history.
  2. Find a prompt — search from the top bar (or press ⌘K). Switch Hybrid → Keyword → Semantic to trade exact matching for meaning, and narrow the rail by source (Codex / OpenCode / Claude Code / Manual), status (Pinned / Archived), or tags.
  3. Fill & copy — open a prompt, fill any {{variables}}, choose a format (Raw / Markdown / XML / JSON), and hit Copy. Your values flow into every format.
  4. Curate — add prompts with New, then pin, tag, edit, duplicate, or archive them as your library grows.

Flags & environment

| Flag / env | Effect | | ------------------- | ------------------------------------------------------------------ | | --port <n> | Pin the server port (default: first free port in 7331–7350). | | --no-open | Start the server without opening a browser. | | CODEX_HOME | Override where Codex history is read from (default ~/.codex). | | OPENCODE_DATA_DIR | Override the OpenCode data dir (~/.local/share/opencode). |

Requirements

Node ≥ 22.5 — the OpenCode reader uses the built-in node:sqlite. Everything else (Codex/Claude ingestion, search, copy) runs on older Node too; only OpenCode ingestion needs it.

Only needed if you edit the UI under src/ — the committed HTML is already built.

git clone https://github.com/SamWongML/prompt-vault
cd prompt-vault
npm install      # dev-only: pulls esbuild
npm run build    # → regenerates "prompt-vault/Prompt Vault.html"
npm run dev      # build + open

The UI ships as one self-contained HTML file. build.mjs concatenates the source in load order, transforms JSX → React.createElement with esbuild (no in-browser Babel), then inlines the CSS and a vendored React build into a single file that works offline — even double-clicked. The local server (node:http, no Express) serves that file and exposes one endpoint, /api/scan, which does the history reading. History ingestion is the one feature that needs the server.

Where is my data? In your browser's localStorage, served over http://localhost. Nothing is uploaded.

Do I need a database? No. For a single-user local vault it's zero-infrastructure — nothing to provision. A backing store would only earn its keep if you wanted cross-device sync.

Does anything leave my machine? No. Ingestion reads history files locally and the page makes no network calls; React is vendored, so it runs fully offline.

Which histories can it read? Codex (~/.codex/sessions), OpenCode (~/.local/share/opencode/opencode.db), and Claude Code (~/.claude/history.jsonl). It keeps user prompts only.

License

MIT.

Recreated from a Claude Design handoff — src/ mirrors the design prototype; the single-file build, local server, and CLI are the production packaging.