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

@bobfromarcher/promptforge

v1.0.0

Published

A compiler for your reusable prompts and text: variables with defaults, file injection, and recursive composition. Render to stdout or the clipboard. Zero dependencies.

Readme

promptforge

npm CI license zero deps

A compiler for the text you reuse. Your prompts and snippets live as plain markdown files. promptforge gives them variables with defaults, file injection, and composition, then renders the finished text to your clipboard. You stop re-typing the same context for every agent or task, and you stop paying tokens to rebuild it. No dependencies, no AI.

It is closer to a small build system for prompts than a snippet box. One prompt can include another, pull in the contents of a file, and fill in variables at the moment you use it.

Install

npm install -g @bobfromarcher/promptforge
# the command is pf (promptforge also works)

A two-minute tour

# create a reusable header, reading the body from stdin
echo "You are reviewing for {{project|de Montfort LLC}}." | pf add preamble

# create a prompt that composes the header and injects a file
pf add code-review --tag dev,review
# body:
#   {{include preamble}}
#
#   Review this {{lang|JS}} file for bugs and simplifications:
#
#   {{file {{path}}}}

# compile it and copy the result to the clipboard
pf use code-review --var path=src/auth.js --var lang=TypeScript

The clipboard now holds the header, the instruction with TypeScript filled in, and the full contents of src/auth.js. Paste it wherever you work.

Template syntax

| Token | Meaning | | --- | --- | | {{name}} | A variable, supplied with --var name=value | | {{name\|default}} | A variable with a fallback if you do not pass one | | {{include other}} | Compose another stored prompt, recursively | | {{file ./path}} | Inject a file's contents. The path may itself use {{vars}} | | {{date}}, {{date iso}}, {{date time}} | The current date or time |

Cycles between includes are detected, and any variable you forget is reported so nothing renders silently wrong.

Commands

| Command | What it does | | --- | --- | | pf ls [--tag t] | List prompts | | pf find <query> | Fuzzy search by name, tag and description | | pf show <name> | Print a prompt with its frontmatter | | pf add <name> [--tag a,b] [--desc "..."] | Create from stdin or $EDITOR | | pf edit <name> | Open in $EDITOR | | pf rm <name> | Delete | | pf vars <name> | List the variables a prompt needs | | pf use <name> [--var k=v ...] [--print] | Compile and copy to the clipboard | | pf stats | Your most-used prompts | | pf where | Print the store directory |

Where it lives

Prompts are markdown files in ~/.promptforge (override with PROMPTFORGE_DIR). Because they are plain files, you can keep the directory in a git repo or a synced folder and carry your whole library between machines.

Clipboard support uses clip on Windows, pbcopy on macOS, and wl-copy, xclip or xsel on Linux. With --print it writes to stdout instead, so it pipes anywhere.

Development

git clone https://github.com/bobfromarcher/promptforge
cd promptforge
node test/test.js

The frontmatter parser, the template engine and the argument parser are all pure functions with the resolvers injected, so the compiler is fully tested without touching the filesystem. CI runs on Node 18, 20 and 22 across Linux, macOS and Windows.

License

MIT, bobfromarcher.