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

keyquill-mobile

v3.6.0

Published

Bring Your Own Key on mobile — Capacitor plugin that stores LLM API keys in iOS Keychain / Android Keystore and calls providers directly from native code. Biometric-gated, policy-enforced, E2E-pairable.

Readme

keyquill-mobile

Bring Your Own Key on mobile — a Capacitor plugin that keeps LLM API keys in iOS Keychain / Android Keystore and calls providers directly from native code.

Note: parallel track with [email protected]+

keyquill-extension has moved to a v1.0 policy broker architecture (model catalogue with capability tags, KeyPolicy with allowlist / denylist / budgets in USD, resolver pipeline, audit ledger, capability- first SDK). keyquill-mobile pre-dates that work and currently ships its own, earlier RelayPolicy surface (provider-hostname allowlist, budgets in microunits, biometric gating) — a different policy model with different wire shape (chatStream({ provider, messages, systemPrompt, maxTokens })).

Unifying mobile onto the broker is tracked as a future arc; it is explicitly out of scope for the v1.0 extension release. Today, mobile is a fully-functional product on its own but is not a broker peer.

┌──────────────────────────────────────────────┐
│                 Your App                      │
│                                                │
│  WebView (Capacitor)    ◄─── JS bridge ───┐    │
└──────────────────────────────────────────│────┘
                                            │
                                  ┌─────────▼──────────┐
                                  │ keyquill-mobile    │
                                  │ (native plugin)    │
                                  │                    │
                                  │ - Keychain/Keystore│
                                  │ - Biometric gate   │
                                  │ - Policy engine    │
                                  │ - Direct HTTPS ────┼──► OpenAI / Anthropic / ...
                                  └────────────────────┘
  • Keys never cross the JS bridge (except during registerKey, and only once).
  • Biometric auth (Face ID / Touch ID / fingerprint) required before key access.
  • Policy engine: provider allowlist, per-request token cap, daily cost cap, HTTPS-only.
  • E2E pairable: acceptPairing() hands off session-encrypted AI requests from a PC browser via keyquill-relay.

Install

pnpm add keyquill-mobile
npx cap sync

iOS requires deployment target ≥ 14.0. Android requires compileSdk ≥ 34.

Usage

import { SecureRelay } from "keyquill-mobile";

// Register a provider key (the only time the key crosses the bridge).
await SecureRelay.registerKey({
  provider: "openai",
  apiKey: "sk-...",
  baseUrl: "https://api.openai.com/v1",
  defaultModel: "gpt-4o",
});

// Stream a chat completion — native side decrypts key, calls provider directly.
const { streamId } = await SecureRelay.chatStream({
  provider: "openai",
  messages: [{ role: "user", content: "Hello" }],
  systemPrompt: "",
});

SecureRelay.addListener("relayStreamEvent", (event) => {
  if (event.type === "delta") console.log(event.text);
});

Policy configuration

import { SecureRelay, defaultPolicy } from "keyquill-mobile";

await SecureRelay.updatePolicy({
  policy: {
    ...defaultPolicy,
    allowedProviders: [
      { provider: "openai", baseUrl: "https://api.openai.com/v1" },
      { provider: "anthropic", baseUrl: "https://api.anthropic.com/v1" },
    ],
    maxTokensPerRequest: 8192,
    dailyBudgetUsd: 5,
    biometricRequiredForHighCost: true,
  },
});

Phone Wallet Relay integration

// After the user scans a pairing QR from their PC browser:
const { sessionId } = await SecureRelay.acceptPairing({
  pairingToken,
  relayUrl: "wss://relay.example.com/relay",
  peerPublicKey,
});

Screen-capture protection

// Android: blocks screenshots/screen-recording of the current Activity.
// iOS: no-op (WKWebView doesn't expose per-screen screenshot block).
await SecureRelay.setScreenSecure({ enabled: true });

Security properties

  • Keys stored in iOS Keychain (kSecAttrAccessibleWhenUnlockedThisDeviceOnly) / Android Keystore (TEE-backed when available).
  • Symmetric encryption for key material at rest (hardware-backed).
  • Biometric authentication required before decrypting the key.
  • Logs never contain tokens, keys, or credentials.

License

MIT