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

promptsite

v0.4.0

Published

One sentence to an audited, ready-to-deploy website: generate a multi-page site with your own model, edit it visually, block leaked secrets, and deploy to Cloudflare Pages or Netlify.

Readme

promptsite

From one sentence to a deployable website, with your own model and your own files.

export ANTHROPIC_API_KEY=sk-ant-...      # your key, read from the environment, never stored

npx promptsite generate "Family bakery in Leeds, sourdough and custom cakes, order online" --template local-business --out ./bakery
npx promptsite edit ./bakery             # polish it visually at http://127.0.0.1:4173, then press Publish

You get an editable project plus plain static HTML, CSS and JS (no framework, no inline code, works under a strict CSP): multi-page, with a working contact form, optional Stripe checkout buttons, and a brand colour of your choice. No key yet? Add --provider mock to try the whole pipeline offline.

The model writes validated JSON copy, not markup. Templates render that copy into the blocks of grapesjs-advance-components and escape every string, so the output is safe by construction and fully editable afterwards.

Generate, edit visually, publish

📖 Documentation · 🧪 Try the editor in your browser

Commands

| Command | Does | |---|---| | promptsite generate "<brief>" | Draft a multi-page site and write it to a folder | | promptsite edit <dir> | Visual editor on localhost (autosave, Publish writes public/) | | promptsite build <dir> | Re-render project.json to public/ (for CI) | | promptsite audit <dir> | Scan a site or any folder for leaked secrets and unsafe markup | | promptsite deploy <dir> --to cloudflare\|netlify | Audit, then publish to Cloudflare Pages or Netlify (a leak stops it) | | promptsite serve --root <dir> | HTTP API for n8n, Zapier or cron (needs PROMPTSITE_API_TOKEN) | | promptsite templates | List the templates |

Templates: landing (Home, Pricing, Contact), local-business (Home, About, Contact), small-business (Home, Services, About, Journal, Contact: testimonials, pricing, FAQ, team and a blog list), shop (Home with Stripe buttons, Contact).

Useful flags: --name, --accent "#0d9488", --theme dark, --payment-link <Stripe Payment Link>, --form-endpoint <url>, --provider anthropic|endpoint|mock, --endpoint <your backend>, --model <id>. Run promptsite --help for all of them.

bakery/
  project.json        the editable GrapesJS project
  promptsite.json     your settings (never a secret)
  public/             index.html, about.html, contact.html + .css + .js + _headers (strict CSP)

Security

Nothing reaches disk or a browser that looks like a secret:

  • Keys stay in the environment. ANTHROPIC_API_KEY and PROMPTSITE_API_TOKEN are never read from flags or written to files. The editor's ✨ button calls the model through the local server.
  • Fail-closed scan. Anthropic, OpenAI, Stripe secret, GitHub, AWS and Slack keys, private keys, credentials or secret-looking parameters in URLs, javascript: URLs, inline handlers and plain-http forms stop generate, build, the editor's Save/Publish and the API. Findings are shown redacted. --allow <rule> is the explicit opt-out.
  • Redacted logs. Errors are stripped of key formats and of the exact key values in use.
  • Strict CSP. Exports include a _headers file (Netlify, Cloudflare Pages): no inline script or style, connect-src limited to your form endpoint.
  • Closed servers. edit and serve listen on loopback only. serve needs a 24+ character bearer token, throttles failures, rejects browser requests, caps body size, jobs and hourly volume, and confines each site to its own folder. edit rejects any foreign Host or Origin.
npx promptsite audit ./bakery --strict   # fail CI on a leak or unsafe markup

What cannot be promised: everything in a static site is public (form endpoints, Payment Links); a webhook URL, including an n8n one, is a bearer credential; the scanner is heuristic; and your brief goes to the model provider. Details in SECURITY.md.

Automation (n8n, CI)

export PROMPTSITE_API_TOKEN="$(openssl rand -hex 24)"
npx promptsite serve --root ./sites      # http://127.0.0.1:8787

POST /v1/generate, /v1/build, /v1/audit, GET /v1/sites and /v1/sites/<slug>/bundle.zip, all with Authorization: Bearer $PROMPTSITE_API_TOKEN. An importable n8n workflow (webhook → generate → audit → respond) is in examples/n8n; it is written from n8n's documented formats and structure-tested, but has not been run inside n8n.

# CI
- run: npx promptsite build ./site && npx promptsite audit ./site --strict

Deploy

export CLOUDFLARE_API_TOKEN=... CLOUDFLARE_ACCOUNT_ID=...
npx promptsite deploy ./bakery --to cloudflare --project my-site --branch main

export NETLIFY_AUTH_TOKEN=...
npx promptsite deploy ./bakery --to netlify --project <site-id> --prod

npx promptsite deploy ./bakery --to cloudflare --project my-site --dry-run   # show the command, deploy nothing

It runs the audit first and stops on a leaked key, then runs wrangler@4 or netlify-cli@27 with the token taken from the environment (tokens are never flags). Both need Node 22+. Netlify makes a draft URL unless you add --prod; on Cloudflare the project's production branch goes live. To try it safely: start with --dry-run, then a throwaway project and a token scoped to it, then revoke the token. The step-by-step, common errors and CI and n8n recipes are in the docs.

Honest limits

  • The copy is a draft. Prices and testimonials are placeholders the tool tells you to replace, and it never invents facts you did not give it.
  • Tested end to end with the mock provider and a fake API server; output quality with a live model depends on the model and your brief.
  • Pages have no images yet. public/ is plain files for any static host, and promptsite deploy publishes them to Cloudflare Pages or Netlify (tested with a fake runner, not yet run against a real account by the author).
  • Needs Node 18 or newer. The first run installs jsdom and grapesjs (the plugin renders in a headless editor).

Development

npm install                        # at the repo root
npm test -w promptsite
npm run build                      # plugin first, then the CLI

License

MIT