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

pagest

v1.5.0

Published

Self-hosted HTML sharing with optional access codes — server, CLI, and AI skill in one zero-dep package

Readme

pagest

Self-hosted HTML sharing with optional access codes — server, CLI, and AI skill in one zero-dep package.

Quickstart

1. Start server

npx pagest serve --port 3000 --dir ./pages

Options:

npx pagest serve --port 8080 --dir /data/pages --token ADMIN_SECRET \
  --public-url https://pages.example.com --trust-proxy

| Flag | Env | Description | |------|-----|-------------| | --port | PAGEST_PORT | Listen port (default 3000) | | --dir | PAGEST_DIR | Storage directory (default ./pages) | | --token | PAGEST_TOKEN | Admin token (bypasses user auth for uploads) | | --public-url | PAGEST_PUBLIC_URL | Base URL for generated share links | | --trust-proxy | PAGEST_TRUST_PROXY | Honor X-Forwarded-Proto/Host headers | | --tls-cert / --tls-key | — | Direct TLS termination (skip if behind reverse proxy) |

CLI upload/delete also reads: PAGEST_DOMAIN, PAGEST_API_KEY.

Access code decryption uses WebCrypto — requires HTTPS or localhost.

2. Register & login

Register via the Web UI (GET /) or API:

curl -X POST https://pages.example.com/api/register \
  -H 'Content-Type: application/json' \
  -d '{"id":"myname","password":"mysecret"}'
  • id — 2–32 chars, [a-zA-Z0-9_-]
  • password — min 4 chars, stored as SHA-256 hash

Login to get an API key:

curl -X POST https://pages.example.com/api/login \
  -H 'Content-Type: application/json' \
  -d '{"id":"myname","password":"mysecret"}'
# => {"ok":true,"id":"myname","apiKey":"sp_a1b2c3d4..."}

Use the API key for all subsequent requests: Authorization: Bearer <apiKey>.

3. Upload from CLI

npx pagest upload report.html --domain https://pages.example.com --api-key sp_xxx

# With access code (AES-256-GCM client-side encryption)
npx pagest upload report.html --domain https://pages.example.com --api-key sp_xxx --seal
# => {"url":"https://pages.example.com/report.html","code":"XXXX-XXXX-XXXX-XXXX"}

# Supply your own code instead of auto-generated
npx pagest upload report.html --seal --code MY-CUSTOM-CODE

Delete:

npx pagest delete report.html --domain https://pages.example.com --api-key sp_xxx

Shorthand — pagest <file.html> is equivalent to pagest upload <file.html>.

Configure ~/.pagestrc.json to skip --domain/--api-key:

{"domain": "https://pages.example.com", "apiKey": "sp_a1b2c3d4..."}

Then: npx pagest upload report.html --seal

4. AI Skill (Claude Code / Codebuddy)

对 AI 说:

帮我安装 pagest skill:先问我装全局还是当前项目,然后 npm install pagest,把安装路径下的 SKILL.md 注册到对应的 settings.json 的 skills 数组里,最后读取 SKILL.md 中的「首次配置」章节引导我完成 ~/.pagestrc.json 的配置。

完成后对 AI 说「发布这个页面」「share this html」即可触发 skill。

5. Web UI

Open http://your-server:3000 — register/login, then drag & drop HTML files. Supports seal (access code encryption), update existing pages, and delete.

Upload target dropdown lets you overwrite an existing page or create a new one with a random URL suffix.

API

| Method | Path | Auth | Body / Query | Description | |--------|------|------|--------------|-------------| | GET | / | — | — | Web UI | | GET | /<name>.html | — | — | Serve page (or sealed unlock form) | | GET | /api/list | — | — | List all pages [{name, size, mtime}] | | POST | /api/register | — | {id, password} | Register new user | | POST | /api/login | — | {id, password} | Login, returns {ok, id, apiKey} | | PUT | /<name>.html | Bearer | HTML body; ?seal=true | Upload/update (server-side seal) | | DELETE | /<name>.html | Bearer | — | Delete page |

Body size limit: 50 MB.

Access Control

  1. User auth — register with id+password, login to get an API key (sp_...), authenticate via Bearer <apiKey>
  2. Admin token — optional --token on server start, grants upload/delete without user registration
  3. Access code (seal) — AES-256-GCM encryption with PBKDF2 key derivation (600k iterations); decryption happens entirely in the browser via WebCrypto (requires HTTPS or localhost)

License

MIT