# Keyvane

> Keyvane gives independent developers license keys, plans, feature access and usage limits in one API, kept in sync with their Stripe subscriptions.

Keyvane is an open-core licensing and entitlement platform for independent developers and small SaaS teams. It connects Stripe subscription events to product access: license keys, plan-based feature access and usage limits, through one REST API and MIT-licensed SDKs for TypeScript (`@keyvane/sdk`) and Python (`keyvane`). It is not a payment processor or Merchant of Record; Stripe keeps charging customers.

Key facts:
- Your app asks `GET /v1/entitlements?customer=<your user id>` (or `keyvane.entitlements.get()`) what a customer may do; `POST /v1/usage` consumes metered usage atomically and idempotently.
- License keys (`KV-XXXXX-XXXXX-XXXXX-XXXXX`) support expiry, suspension, revocation and device activation limits; publishable keys (`kv_pk_`) can validate keys from client apps.
- Stripe sync needs only a webhook signing secret, not Stripe API keys. Events are verified, stored, idempotent, transactional and order-safe; failed events can be replayed.
- Self-hostable: one Node.js 22 process with SQLite. The platform is FSL-1.1-MIT (MIT after two years); SDK, examples and docs are MIT.
- Pricing (beta, USD, no revenue commission): Developer free, Indie $19/month, Startup $59/month, Business custom.

## Docs

- [Introduction](https://keyvane.dev/docs.md): What Keyvane is, how it fits between Stripe and your app, and where to start.
- [Quickstart](https://keyvane.dev/docs/getting-started.md): Run Keyvane, define plans, check entitlements and simulate a purchase in about 10 minutes.
- [Core concepts](https://keyvane.dev/docs/concepts.md): Projects, products, plans, features, customers, licenses and exactly how access is decided.
- [Stripe integration](https://keyvane.dev/docs/stripe.md): Connect a Stripe webhook, map prices to plans, identify customers and test the subscription lifecycle.
- [License keys & devices](https://keyvane.dev/docs/license-keys.md): Issue, validate and revoke license keys and enforce device activation limits for desktop apps and CLIs.
- [Next.js](https://keyvane.dev/docs/nextjs.md): Gate features and meter usage in a Next.js App Router app with server components and route handlers.
- [Express & Node APIs](https://keyvane.dev/docs/express.md): Middleware that checks plans and consumes usage limits in an Express or other Node.js API.
- [Electron & desktop apps](https://keyvane.dev/docs/electron.md): License-key activation, device limits and offline grace for Electron apps.
- [Stripe webhook edge cases](https://keyvane.dev/docs/stripe-webhook-edge-cases.md): Seven Stripe webhook edge cases that silently break access, and how to handle each one.
- [JavaScript SDK](https://keyvane.dev/docs/sdk.md): Every method of @keyvane/sdk: entitlements, usage, customers, licenses, products, errors and retries.
- [Python SDK](https://keyvane.dev/docs/python.md): The zero-dependency Python client: entitlements, usage limits and license keys, with a FastAPI example.
- [REST API](https://keyvane.dev/docs/api-reference.md): REST API v1: authentication, errors, pagination, idempotency and every endpoint with examples.
- [AI coding agents](https://keyvane.dev/docs/agents.md): How Claude Code, Cursor and other agents can integrate Keyvane: llms.txt, SKILL.md and OpenAPI.
- [Self-hosting](https://keyvane.dev/docs/self-hosting.md): Deploy Keyvane with Docker or Fly.io: configuration, backups, upgrades and a production checklist.
- [Security & reliability](https://keyvane.dev/docs/security.md): How credentials are stored, how forms and webhooks are protected and how access decisions stay correct.
- [Pricing & licensing](https://keyvane.dev/docs/pricing-and-licensing.md): What is MIT, what is FSL-licensed, and Keyvane Cloud plans.
- [Roadmap](https://keyvane.dev/docs/roadmap.md): What shipped in the MVP and what is planned for the public beta and the commercial platform.

## API

- [OpenAPI 3.1 spec](https://keyvane.dev/openapi.json): machine-readable description of REST API v1
- [Agent skill](https://keyvane.dev/SKILL.md): step-by-step instructions for coding agents integrating Keyvane into an app

## Optional

- [Pricing](https://keyvane.dev/pricing): plans and limits
- [Build vs. buy](https://keyvane.dev/compare/build-vs-buy): when to build licensing yourself
- [Changelog](https://keyvane.dev/changelog): dated release notes
- [Full content in one file](https://keyvane.dev/llms-full.txt)
- [Source code](https://github.com/Ravenium22/Keyvane)
