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

@fanu-el/prvm

v0.1.1

Published

Prompt Version Manager — track, test, and manage LLM prompt versions

Readme

prvm — Prompt Version Manager

npm version downloads license

Track, test, and manage LLM prompt versions with confidence.

Features

  • Version Control — Save and track multiple versions of your prompts
  • Batch Testing — Run prompts against multiple inputs and compare results
  • Cross-Provider Support — Works with Anthropic, OpenAI, and Google Gemini
  • Template Variables — Use {{placeholders}} in prompts for dynamic content
  • Import/Export — Share prompts as JSON files
  • Configurable — Set defaults for provider, model, temperature, and max_tokens

Installation

npm install -g @fanu-el/prvm

Prerequisites

  • Node.js 18+
  • API key for your chosen provider (Anthropic, OpenAI, or Google Gemini)

Quick Start

1. Initialize

# Set up prvm in your project directory
prvm init

# Configure your default provider and model
prvm config --provider anthropic --model claude-sonnet-4-6 --temperature 0.7

2. Save a Prompt

Create a prompt file prompts/summarize.txt:

Please summarize the following text in {{style}} style:

{{content}}

Save it:

prvm save summarize prompts/summarize.txt -n "Initial version"

3. Test with Template Variables

Create an input file inputs.json:

{
  "style": "professional",
  "content": "The quick brown fox jumps over the lazy dog. This pangram contains every letter of the English alphabet at least once."
}

Run the test:

prvm test summarize -i inputs.json

4. Batch Eval

Create an eval file eval-inputs.json:

[
  { "style": "casual", "content": "First text to summarize..." },
  { "style": "formal", "content": "Second text to summarize..." },
  { "style": "technical", "content": "Third text to summarize..." }
]

Run batch eval:

prvm eval summarize eval-inputs.json

Commands

Prompt Management

| Command | Description | |---------|-------------| | prvm save <name> <file> | Save a new prompt or new version | | prvm list | List all saved prompts | | prvm show <name> [version] | Show prompt details | | prvm use <name> <version> | Set active version | | prvm rollback <name> | Revert to previous version | | prvm diff <name> | Compare versions | | prvm history <name> | Show version history | | prvm current <name> | Show active version content |

Testing & Evaluation

| Command | Description | |---------|-------------| | prvm test <name> [version] | Test prompt with input file | | prvm eval <name> <file> | Batch eval with multiple inputs |

Configuration

| Command | Description | |---------|-------------| | prvm config --show | View current config | | prvm config --provider <p> | Set default provider | | prvm config --model <m> | Set default model | | prvm config --temperature <t> | Set default temperature | | prvm config --max-tokens <n> | Set default max tokens | | prvm config --max-runs <n> | Set max test runs to keep |

Import/Export

| Command | Description | |---------|-------------| | prvm export <name> <outFile> | Export prompt to JSON | | prvm import <file> | Import prompt from JSON |

Utilities

| Command | Description | |---------|-------------| | prvm init | Initialize prvm in current directory | | prvm gitignore --add | Add .prompts to .gitignore |

Template Variables

Use {{variable}} syntax in your prompts to create dynamic templates:

Prompt file:

Act as a {{role}} and {{task}} the following:

{{content}}

Input JSON:

{
  "role": "senior editor",
  "task": "proofread and improve",
  "content": "Your text here..."
}

The variables will be substituted before sending to the LLM.

Configuration

Environment Variables

Set your API keys as environment variables:

# Anthropic
export ANTHROPIC_API_KEY=your-key

# OpenAI
export OPENAI_API_KEY=your-key

# Google Gemini
export GOOGLE_API_KEY=your-key

Config File

After prvm init, a .prompts/config.json file is created:

{
  "provider": "anthropic",
  "model": "claude-sonnet-4-6",
  "temperature": 0.7,
  "max_runs_per_version": 20,
  "max_tokens": 4096
}

Override Options

Most commands accept override options:

# Override temperature for a single test
prvm test my-prompt -i input.json --temperature 0.5

# Override model and max_tokens
prvm test my-prompt -i input.json --model gpt-4 --max-tokens 2048

# Override provider
prvm eval my-prompt inputs.json --provider openai

Examples

See the examples/ directory for complete workflows including content creation pipelines, A/B testing, and multi-provider comparisons.

A/B Test Prompt Versions

# Save two versions
prvm save summarizer v1-prompt.txt
prvm save summarizer v2-prompt.txt

# Test both against same inputs
prvm eval summarizer v1 inputs.json
prvm eval summarizer v2 inputs.json

# Compare results
prvm diff summarizer

Multi-Provider Testing

# Test with different providers
prvm test summarizer -i input.json --provider anthropic --model claude-sonnet-4-6
prvm test summarizer -i input.json --provider openai --model gpt-4
prvm test summarizer -i input.json --provider gemini --model gemini-pro

Share Prompts

# Export
prvm export summarizer summarizer.json

# Share the file, then import elsewhere
prvm import summarizer.json

File Structure

your-project/
├── .prompts/
│   ├── config.json          # Global configuration
│   ├── summarizer/
│   │   ├── meta.json        # Prompt metadata
│   │   ├── v1.json          # Version 1
│   │   └── v2.json          # Version 2
│   └── translator/
│       ├── meta.json
│       └── v1.json
├── prompts/                  # Your prompt files (optional)
│   ├── summarizer.txt
│   └── translator.txt
└── inputs/                   # Test input files (optional)
    ├── test1.json
    └── eval.json

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Run tests: npm test
  4. Submit a pull request

License

MIT