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

@mazhu/prompt-vault

v1.0.0

Published

A lightweight AI prompt manager — store, version, tag, search, and render prompts with template variables. Zero dependencies.

Readme

🏦 prompt-vault

A lightweight AI prompt manager — store, version, tag, search, and render prompts with template variables. Zero dependencies.

npm version License: MIT

Why?

If you work with AI (ChatGPT, Claude, GPT-4 API, etc.), you have prompts scattered everywhere — notes, docs, code comments. prompt-vault gives them a home:

  • 📦 Store prompts with IDs, names, descriptions, tags
  • 🔖 Template variables{{language}}, {{topic}}, etc.
  • 📜 Version history — every edit is tracked
  • 🔍 Search & filter — by tag, keyword, or name
  • 💾 File persistence — save/load from JSON
  • 🖥️ CLI — manage prompts from the terminal
  • 🪶 Zero dependencies — just Node.js

Install

npm install prompt-vault

Quick Start

const { PromptVault } = require('prompt-vault');

const vault = new PromptVault({ name: 'my-prompts' });

// Add prompts
vault.add({
  id: 'code-review',
  template: 'Review this {{language}} code for bugs and suggest improvements:\n\n{{code}}',
  tags: ['coding', 'review'],
  defaults: { language: 'JavaScript' },
});

vault.add({
  id: 'blog-post',
  template: 'Write a {{length}} blog post about {{topic}} in {{tone}} tone',
  tags: ['writing', 'blog'],
  defaults: { length: '500-word', tone: 'professional' },
});

// Render with variables
console.log(vault.render('code-review', { code: 'function add(a,b) { return a-b }' }));
// → "Review this JavaScript code for bugs and suggest improvements:
//    function add(a,b) { return a-b }"

// Search
vault.list({ tag: 'coding' });
vault.list({ search: 'blog' });

// Stats
console.log(vault.stats());

CLI

# Add a prompt
npx prompt-vault add code-review "Review this {{language}} code: {{code}}" --tag=coding

# Render
npx prompt-vault render code-review language=Python code="print('hello')"

# List all
npx prompt-vault list

# Filter by tag
npx prompt-vault list --tag=coding

# Show details
npx prompt-vault get code-review

# Remove
npx prompt-vault remove code-review

# Export / Import
npx prompt-vault export prompts.json
npx prompt-vault import prompts.json

API

new PromptVault({ name, path })

Creates a new vault. path sets the default file for save()/load().

vault.add(opts) / vault.set(id, template, opts)

Add a prompt. set() will update if the id already exists.

vault.add({
  id: 'summarize',
  template: 'Summarize this {{type}} in {{length}} words:\n{{content}}',
  name: 'Summarizer',
  description: 'Universal summarization prompt',
  tags: ['writing', 'summary'],
  defaults: { type: 'article', length: '100' },
  meta: { author: 'team', version: '2.0' },
});

vault.get(id)PromptEntry | null

vault.render(id, values)string

Renders the prompt template with provided values (merged with defaults).

vault.update(id, template, opts)

Updates a prompt. Creates a new version entry automatically.

vault.remove(id)boolean

vault.list({ tag, search, sort, limit })PromptEntry[]

  • tag — filter by tag (string or array)
  • search — search in id, name, description, template
  • sort'name', 'created', or 'updated'
  • limit — max results

vault.stats(){ name, total, tags }

vault.save(path?) / vault.load(path?)

File persistence (Node.js only). Requires vault.path or passing a path.

vault.stringify(indent?) / vault.parse(json)

JSON export/import.

PromptEntry

Each prompt has:

| Property | Type | Description | |-------------|------------|----------------------------------| | id | string | Unique identifier | | template | string | Template with {{var}} syntax | | name | string | Human-readable name | | description | string | Description | | tags | string[] | Tags for filtering | | defaults | object | Default variable values | | meta | object | Arbitrary metadata | | vars | string[] | Auto-extracted template variables| | versions | array | Version history | | created | number | Creation timestamp | | updated | number | Last update timestamp |

entry.render(values?)

Renders the template. Missing variables throw an error.

entry.update(template, opts?)

Updates the prompt and appends to version history.

entry.version(n)

Get a specific version (1-indexed, negative counts from end).

Real-World Patterns

Shared Team Prompt Library

// On a shared drive / git repo
const vault = new PromptVault({ path: './team-prompts.json' });
vault.load();

// Everyone uses the same vetted prompts
const prompt = vault.render('api-docs', { endpoint: '/users', method: 'GET' });

Prompt A/B Testing

vault.add({ id: 'summarize-v1', template: 'Summarize: {{text}}', tags: ['experiment-a'] });
vault.add({ id: 'summarize-v2', template: 'Create a concise summary of: {{text}}', tags: ['experiment-b'] });

// Track which performs better via version history

CI/CD Integration

// Generate release notes with a consistent prompt
const vault = new PromptVault();
vault.load('./prompts.json');
const prompt = vault.render('release-notes', { commits: commitLog, version: '2.0.0' });

License

MIT