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

kavachos

v0.2.1

Published

The auth OS for AI agents - identity, permissions, delegation, and audit for the agentic era

Readme


Why kavachos?

Every auth library handles human login. None of them handle AI agent identity. KavachOS gives every agent its own bearer token, scoped permissions, delegation chains, and an immutable audit trail. Plus full human auth (14 methods, 27+ OAuth providers, passkeys, SSO) so you don't need two auth systems.

npm install kavachos

Quick start

import { createKavach } from "kavachos";
import { emailPassword } from "kavachos/auth";

const kavach = createKavach({
  database: { provider: "sqlite", url: "kavach.db" },
  plugins: [emailPassword()],
});

// Create an AI agent with scoped permissions
const agent = await kavach.agent.create({
  ownerId: "user-123",
  name: "github-reader",
  type: "autonomous",
  permissions: [
    { resource: "mcp:github:*", actions: ["read"] },
    { resource: "mcp:deploy:production", actions: ["execute"],
      constraints: { requireApproval: true } },
  ],
});

// Authorize and audit (< 1ms)
const result = await kavach.authorize(agent.id, {
  action: "read",
  resource: "mcp:github:repos",
});
// { allowed: true, auditId: "aud_..." }

Features

Agent identity

  • Cryptographic bearer tokens (kv_...)
  • Wildcard permission matching (mcp:github:*)
  • Delegation chains with depth limits
  • Immutable audit trail
  • Trust scoring and anomaly detection
  • Budget policies and cost attribution
  • CIBA-style human approval flows

Human auth (14 methods)

  • Email + password
  • Magic link, email OTP
  • Passkey / WebAuthn
  • TOTP 2FA
  • Phone SMS
  • Google One-tap
  • Sign In With Ethereum
  • Anonymous auth
  • Session freshness enforcement

OAuth (27+ providers)

Google, GitHub, Apple, Microsoft, Discord, Slack, GitLab, LinkedIn, Twitter/X, Facebook, Spotify, Twitch, Reddit, Notion, plus a generic OIDC factory for any provider.

MCP OAuth 2.1

Spec-compliant authorization server for Model Context Protocol. PKCE S256, RFC 9728 / 8707 / 8414 / 7591.

Enterprise

Organizations + RBAC, SAML SSO, SCIM directory sync, admin controls, API key management, multi-tenant isolation, GDPR compliance.

Edge compatible

Runs on Cloudflare Workers (D1), Deno, Bun, and Node.js. Only 3 runtime deps: drizzle-orm, jose, zod.

Security

Rate limiting (per-agent and per-IP) · HIBP breach checking · CSRF protection · httpOnly secure cookies · Email enumeration prevention · Trusted device windows · Password reset with signed tokens

Framework adapters

Works with every major framework:

| Framework | Package | Framework | Package | |-----------|---------|-----------|---------| | Hono | @kavachos/hono | Nuxt | @kavachos/nuxt | | Express | @kavachos/express | SvelteKit | @kavachos/sveltekit | | Next.js | @kavachos/nextjs | Astro | @kavachos/astro | | Fastify | @kavachos/fastify | NestJS | @kavachos/nestjs |

Client libraries

| Package | What | |---------|------| | @kavachos/react | KavachProvider + hooks | | @kavachos/vue | Vue 3 plugin + composables | | @kavachos/svelte | Svelte stores | | @kavachos/ui | 7 pre-built auth components (SignIn, SignUp, UserButton...) | | @kavachos/expo | React Native / Expo | | @kavachos/electron | Electron desktop | | @kavachos/client | Zero-dep TypeScript REST client |

Databases

SQLite, PostgreSQL, MySQL, Cloudflare D1, libSQL (Turso). Tables are auto-created on first run.

// Cloudflare Workers + D1
createKavach({ database: { provider: "d1", binding: env.KAVACH_DB } });

// PostgreSQL
createKavach({ database: { provider: "postgres", url: process.env.DATABASE_URL } });

Plugins

Auth methods are plugins. Enable what you need:

import {
  emailPassword, magicLink, passkey, totp,
  organizations, sso, admin, apiKeys, webhooks,
} from "kavachos/auth";

createKavach({
  database: { provider: "sqlite", url: "kavach.db" },
  plugins: [emailPassword(), magicLink({ sendMagicLink }), passkey(), totp()],
});

KavachOS Cloud

Don't want to self-host? KavachOS Cloud is the managed version with dashboard, billing, and zero infrastructure.

| | Free | Starter | Growth | Scale | |---|---|---|---|---| | MAU | 1,000 | 10,000 | 50,000 | 200,000 | | Price | $0 | $29/mo | $79/mo | $199/mo |

Start free · Compare plans · Self-host instead

Documentation

Full docs at docs.kavachos.com

License

MIT