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

promptthread

v0.1.0

Published

Git for prompts. Version control and performance tracking for AI prompts.

Readme

PromptThread JavaScript SDK

Git for prompts. Version control and performance tracking for AI prompts.

Part of the Thread Suite — open-source reliability tools for AI agents.

Installation

npm install promptthread

Quick Start

const PromptThread = require("promptthread");

const pt = new PromptThread("https://prompt-thread.onrender.com");

async function main() {
  // Create a prompt
  const prompt = await pt.createPrompt(
    "summarizer-v1",
    "You are a summarizer. Return a 3-sentence summary.",
    "First summarizer prompt",
    ["summarizer"]
  );

  const promptId = prompt.id;

  // Log a run against it
  await pt.logRun(promptId, 1, {
    input: "Long text here...",
    output: "Summary here...",
    latencyMs: 340.5,
    costUsd: 0.000021,
    passed: true,
    metadata: { model: "gpt-4o" }
  });

  // Get performance stats
  const stats = await pt.getStats(promptId);
  console.log(stats);

  // Update the prompt (creates new version automatically)
  await pt.updatePrompt(
    promptId,
    "You are a summarizer. Return a 2-sentence summary."
  );

  // See what changed
  const diff = await pt.diff(promptId, 1, 2);
  console.log(diff);

  // Roll back to version 1
  await pt.rollback(promptId, 1);
}

main();

API Reference

Prompts

| Method | Description | |--------|-------------| | createPrompt(name, content, description, tags) | Create a new prompt at version 1 | | listPrompts() | List all prompts | | getPrompt(promptId) | Get a prompt by ID | | updatePrompt(promptId, content, description, tags) | Update prompt, auto-increments version | | getHistory(promptId) | Get all previous versions | | rollback(promptId, version) | Roll back to a previous version | | diff(promptId, versionA, versionB) | Compare two versions |

Runs

| Method | Description | |--------|-------------| | logRun(promptId, promptVersion, options) | Log a run against a prompt version | | getRuns(promptId) | Get all runs for a prompt | | getStats(promptId) | Get pass rate, latency, cost stats | | compare(promptId, versionA, versionB) | Compare performance between versions |

Part of the Thread Suite

| Tool | What it does | |------|-------------| | Iron-Thread | Validates AI output structure before it hits your database | | TestThread | Tests whether your agent behaves correctly across runs | | PromptThread | Versions and tracks prompt performance over time |