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

@chest-gate/upstream-proxy

v0.1.3

Published

Templated key-holding proxy: publishers wrap an upstream API without exposing keys to chest gate

Readme

@chest-gate/upstream-proxy

npm license

Scaffolds a key-holding proxy for Chest Gate. When you wrap an upstream API behind a chest gate, the publisher's API key has to live somewhere — this CLI generates a tiny self-contained Hono proxy you deploy yourself, so the key stays in your env, never in chest.sh's infrastructure.

agent ──▶ gate.chest.sh/g/<slug>/* ──▶ your proxy ──▶ upstream API
                                            │
                                  injects your auth header

Before you proxy a third-party API: check that the provider's terms of service permit proxying access to your own end-users. Some plans require a redistribution or reseller license. This pattern works best with APIs you own, run, or are explicitly licensed to redistribute.

Quickstart

npx @chest-gate/upstream-proxy@latest init my-api \
  --target https://api.example.com/v1 \
  --auth-header "x-api-key=\$ENV:UPSTREAM_KEY"

Drops a ./my-api/ directory you can deploy to Vercel as-is. Set UPSTREAM_KEY in your hosting env, deploy, then point a chest gate at the deployed URL.

What the generated proxy enforces (per request)

  1. Path allowlist — rejects requests outside the patterns you allowed.
  2. Header strip — drops caller-supplied authorization / cookie / x-api-key* from the inbound request before forwarding.
  3. Auth inject — adds exactly one upstream auth header, value sourced from process.env.
  4. Egress allowlist — only the configured --target host is callable. SSRF-proof.
  5. Response sanitisationset-cookie and www-authenticate stripped from upstream responses.

Wire it through Chest

# After deploying the generated proxy:
chest deploy --upstream https://my-api.vercel.app --slug my-api --price '$0.01'

Now agents pay USDC per call to gate.chest.sh/g/my-api/*, your proxy injects the key and forwards, and the upstream never sees the agent's wallet.

CLI flags

| Flag | Required | Description | |---|---|---| | <name> (positional) | yes | Output directory + package name. Lowercase alphanumeric + dashes. | | --target <url> | yes | Upstream API origin. | | --auth-header <name=value> | yes | Header to inject. Value may use $ENV:VARNAME to read from env at runtime. | | --allow-paths <patterns> | no | CSV path allowlist. Default * (everything). | | --strip-headers <names> | no | CSV header names to strip from caller. Default authorization,cookie,x-api-key. | | --out <dir> | no | Output directory. Default ./<name>. |

Generated proxy stack

  • Hono on Vercel Edge — global, fast cold start
  • Strict per-request allowlist + egress lock
  • Zero state, zero secrets in code, zero chest.sh dependency at runtime

Threat model

The full threat model, alternatives considered (vault tier, BYO Lambda, Cloudflare Workers), and the path to a hosted-vault tier are documented in the design notes. Want a copy? Open an issue at chesthq/packages.

Related

License

MIT © Chest Gate