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

@keyr/cli

v0.0.2

Published

Local-first MITM HTTPS proxy that injects credentials and OAuth grants for AI agents.

Readme

keyr

Local-first MITM HTTPS proxy that injects credentials and OAuth grants for AI agents — so agents (Claude Code, Cursor, custom SDK agents) never see raw keys or refresh tokens.

Status: alpha. All Phase 1–5 features have shipped (proxy, broker, requests, OAuth Apps + Grants + refresh worker, container isolation). Distribution polish (single-binary releases, Homebrew tap) is in progress.

What it does

  • Intercepts agent HTTPS traffic via a transparent MITM proxy.
  • Injects the right Authorization header per upstream host based on per-Vault config.
  • Supports static credentials (API keys, basic auth, custom headers).
  • Holds OAuth refresh tokens and keeps access tokens fresh in the background.
  • Notifies the human operator when an OAuth grant goes invalid (invalid_grant) so it can be re-authorized.
  • Approval-gated: agents cannot edit Vault contents directly — they file Requests that the human reviews and applies.

Concepts

| Term | Meaning | | --- | --- | | Vault | A namespace of Resources, Credentials, OAuth Apps, and Grants | | Resource | Per-host config (e.g. api.github.com → use Credential GITHUB_TOKEN) | | Credential | A stored static value (API key, password, custom header) | | OAuth App | A registered app on the provider side (client_id + client_secret from Google / GitHub / etc.) | | Grant | Live OAuth state — access token + refresh token + scopes for one authorized account | | Request | Pending agent-to-human approval (the change-control system) | | Agent | An AI process you grant access to a Vault (Claude Code, Cursor, etc.) |

Quickstart

# Install. Today only the npm path is available; brew / curl-install are
# tracked under Phase 6 and will land alongside the first signed release.
npm install -g @keyr/cli

# First-run setup. `keyr init` prints the instance proxy token once;
# save it (env var, password manager, etc.) — `keyr run` needs it.
keyr init

# Start the daemon (foreground; ^C to stop). HTTP API on 7331, MITM
# proxy on 7332. Open http://127.0.0.1:7331 for the web UI.
keyr server

# --- Static-credential resource ---
keyr credential set --vault default --key GITHUB_TOKEN ghp_xxx
keyr resource add  --vault default --host api.github.com --auth bearer --credential GITHUB_TOKEN

# --- OAuth grant (Google / GitHub / etc.) ---
keyr oauth-app create --vault default --provider google \
  --display-name "Personal Google" \
  --client-id <your-client-id> --client-secret <your-client-secret>

keyr grant connect --vault default --provider google
# → opens an authorize URL; after you grant access in the browser the
#   server's /v1/oauth/callback persists the Grant.

keyr resource add --vault default --host www.googleapis.com \
  --auth oauth2 --grant <grant-id-from-list>

# --- Run an agent through the proxy ---
export KEYR_TOKEN=<proxy-token-from-init>

# Cooperative (HTTPS_PROXY env vars; trusted agents):
keyr run -- claude

# Non-cooperative (Docker + iptables-locked egress; for untrusted agents):
keyr run --isolation=container -- claude

Development

Requires Node.js ≥ 22.

npm install
npm test                              # vitest, must be 100% green
npm run typecheck                     # tsc --noEmit, strict
npm run lint                          # biome check, no errors
npm run dev -- init                   # iterate locally
npm run build                         # esbuild bundle to dist/index.js

Every PR must pass lint + typecheck + test. CI enforces this.

Architecture

  • Two ports: HTTP API on 7331, MITM proxy on 7332. Both bind to 127.0.0.1 by default.
  • SQLite at ~/.keyr/keyr.db. AES-256-GCM at rest; Argon2id-derived KEK wraps the DEK.
  • MITM proxy with per-SNI leaf certs minted by an embedded ECDSA P-256 software CA whose root key is encrypted with the DEK.
  • Background OAuth refresh worker (Phase 4) keeps Grants fresh; expired Grants surface as Requests for re-auth.

For the full architectural rationale, read the Architecture Decision Records. For the threat model and crypto choices, read docs/security.md. For agent-friendly project conventions, read AGENTS.md.

License

MIT. Inspired by Infisical Agent Vault (also MIT) — see THIRD_PARTY_LICENSES.