{"id":31225386,"url":"https://github.com/rivet-dev/rivetkit","last_synced_at":"2025-09-22T01:02:28.289Z","repository":{"id":227855635,"uuid":"753886289","full_name":"rivet-dev/rivetkit","owner":"rivet-dev","description":"A library for building stateful workloads anywhere","archived":false,"fork":false,"pushed_at":"2025-09-16T03:25:22.000Z","size":35122,"stargazers_count":1148,"open_issues_count":59,"forks_count":37,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-09-16T05:41:08.480Z","etag":null,"topics":["actor","actors","agents","ai","ai-agents","bun","bunjs","cloudflare-durable-objects","cloudflare-workers","durable-objects","nodejs","rivet","supabase","typescript","vercel"],"latest_commit_sha":null,"homepage":"https://www.rivet.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rivet-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2024-02-07T01:06:25.000Z","updated_at":"2025-09-16T03:25:22.000Z","dependencies_parsed_at":"2024-05-21T12:26:18.501Z","dependency_job_id":"c0d00476-e1dd-4dea-a10b-00474e54d3a4","html_url":"https://github.com/rivet-dev/rivetkit","commit_stats":null,"previous_names":["rivet-gg/opengb","rivet-gg/modules","opengamebackend/opengamebackend","rivet-gg/actor-core","rivet-gg/rivetkit","rivet-dev/rivetkit"],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/rivet-dev/rivetkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rivet-dev%2Frivetkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rivet-dev%2Frivetkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rivet-dev%2Frivetkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rivet-dev%2Frivetkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rivet-dev","download_url":"https://codeload.github.com/rivet-dev/rivetkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rivet-dev%2Frivetkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276329467,"owners_count":25623326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-21T02:00:07.055Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actor","actors","agents","ai","ai-agents","bun","bunjs","cloudflare-durable-objects","cloudflare-workers","durable-objects","nodejs","rivet","supabase","typescript","vercel"],"created_at":"2025-09-22T01:01:08.173Z","updated_at":"2025-09-22T01:02:28.282Z","avatar_url":"https://github.com/rivet-dev.png","language":"TypeScript","readme":"\u003c!-- \nTHIS FILE IS AUTO-GENERATED. DO NOT EDIT DIRECTLY.\nTo update this README, run: npm run gen:readme in the github.com/rivet-dev/rivet repository\nGenerated from: github.com/rivet-dev/rivet/site/scripts/generateReadme.mjs\n--\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://rivetkit.org\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"./.github/media/logo/dark.svg\" alt=\"RivetKit\"\u003e\n      \u003cimg src=\"./.github/media/logo/light.svg\" alt=\"RivetKit\" height=\"75\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n  \u003cbr/\u003e\n  \u003cbr/\u003e\n  \u003cp\u003e\u003cb\u003eThe open-source alternative to Durable Objects\u003c/b\u003e\u003c/p\u003e\n  \u003cp\u003e\n    RivetKit is a library for long-lived processes with durable state, realtime, and scalability.\u003cbr/\u003e\n\tEasily \u003cu\u003eself-hostable\u003c/u\u003e and works \u003cu\u003ewith your infrastructure\u003c/u\u003e.\n  \u003c/p\u003e\n  \u003cp\u003e\n    \u003ca href=\"https://rivet.dev/docs/actors/quickstart\"\u003eQuickstart\u003c/a\u003e •\n    \u003ca href=\"https://rivet.dev/docs/actors\"\u003eDocumentation\u003c/a\u003e •\n    \u003ca href=\"https://rivet.dev/docs/general/self-hosting\"\u003eSelf-Hosting\u003c/a\u003e •\n    \u003ca href=\"https://rivet.dev/discord\"\u003eDiscord\u003c/a\u003e •\n    \u003ca href=\"https://x.com/rivet_gg\"\u003eX\u003c/a\u003e •\n    \u003ca href=\"https://bsky.app/profile/rivet.gg\"\u003eBluesky\u003c/a\u003e\n  \u003c/p\u003e\n  \u003cp\u003e\n    \u003ci\u003e\n      Supports \u003ca href=\"https://rivet.dev/docs/actors/quickstart/backend/\"\u003eNode.js\u003c/a\u003e, \u003ca href=\"https://rivet.dev/docs/actors/quickstart/backend/\"\u003eBun\u003c/a\u003e, \u003ca href=\"https://rivet.dev/docs/hosting-providers/cloudflare-workers/\"\u003eCloudflare\u003c/a\u003e,\u003cbr/\u003e\n      \u003ca href=\"https://rivet.dev/docs/clients/react/\"\u003eReact\u003c/a\u003e, \u003ca href=\"https://rivet.dev/docs/clients/rust/\"\u003eRust\u003c/a\u003e, \u003ca href=\"https://rivet.dev/docs/integrations/hono/\"\u003eHono\u003c/a\u003e, \u003ca href=\"https://rivet.dev/docs/integrations/express/\"\u003eExpress\u003c/a\u003e, \u003ca href=\"https://rivet.dev/docs/integrations/trpc/\"\u003etRPC\u003c/a\u003e, and \u003ca href=\"https://rivet.dev/docs/integrations/better-auth/\"\u003eBetter Auth\u003c/a\u003e.\n    \u003c/i\u003e\n  \u003c/p\u003e\n  \u003cp\u003e\n   \u003ca href=\"https://pkg.pr.new/~/rivet-dev/rivetkit\"\u003e\n      \u003cimg src=\"https://pkg.pr.new/badge/rivet-dev/rivetkit\" alt=\"RivetKit on pkg.pr.new\" /\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Projects\n\nPublic-facing projects:\n\n- **RivetKit** (you are here): Lightweight TypeScript library for building Rivet Actors\n- **[Rivet Engine](https://github.com/rivet-dev/rivet)** : Engine that powers Rivet Actors at scale — completely optional\n- **[Rivet Studio](https://github.com/rivet-dev/rivet/tree/main/frontend/apps/studio)**: Like Chrome DevTools, but for Rivet Actors\n- **[Rivet Documentation](https://github.com/rivet-dev/rivet/tree/main/site/src/content/docs)**\n\n## Get Started\n\n### Guides\n\nGet started with Rivet by following a quickstart guide:\n\n- [Node.js \u0026 Bun](https://www.rivet.dev/docs/actors/quickstart/backend/)\n- [React](https://www.rivet.dev/docs/actors/quickstart/react/)\n\n\n### Quickstart\n\n**Step 1**: Install RivetKit\n\n```sh\nnpm install rivetkit\n```\n\n**Step 2**: Create an actor\n\n```typescript\n// registry.ts\nimport { actor, setup } from \"rivetkit\";\n\nexport const counter = actor({\n\tstate: { count: 0 },\n\tactions: {\n\t\tincrement: (c, amount: number = 1) =\u003e {\n\t\t\t// State changes are durable \u0026 automatically persisted\n\t\t\tc.state.count += amount;\n\t\t\t// Broadcast realtime events\n\t\t\tc.broadcast(\"countChanged\", c.state.count);\n\t\t\t// Return data to client\n\t\t\treturn c.state.count;\n\t\t},\n\t\tgetCount: (c) =\u003e c.state.count,\n\t},\n});\n\nexport const registry = setup({\n\tuse: { counter },\n});\n```\n\nRead more about [state](https://rivet.dev/docs/actors/state/), [actions](https://rivet.dev/docs/actors/actions/), and [events](https://rivet.dev/docs/actors/events/).\n\n**Step 2**: Setup server\n\n_Alternatively, see the [React](https://rivet.dev/docs/actors/quickstart/react/) guide which does not require a server._\n\n```typescript\n// server.ts\nimport { registry } from \"./registry\";\nimport { Hono } from \"hono\";\n\n// Start with file system driver for development\nconst { client, serve } = registry.createServer();\n\n// Setup your server\nconst app = new Hono();\n\napp.post(\"/increment/:name\", async (c) =\u003e {\n\tconst name = c.req.param(\"name\");\n\n\t// Get or create actor with key `name`\n\tconst counter = client.counter.getOrCreate(name);\n\n\t// Call an action (with full type safety)\n\tconst newCount = await counter.increment(1);\n\n\treturn c.json({ count: newCount });\n});\n\n// Start server with Rivet\nserve(app);\n```\n\nStart the server with:\n\n```typescript\nnpx tsx server.ts\n// or\nbun server.ts\n```\n\nRead more about [clients](https://rivet.dev/docs/actors/clients/).\n\nYou can connect to your server with:\n\n```typescript\n// client.ts\nconst response = await fetch(\"http://localhost:8080/increment/my-counter\", { method: \"POST\" });\nconst result = await response.json();\nconsole.log(\"Count:\", result.count); // 1\n```\n\n**Step 3**: Deploy\n\nTo scale Rivet in production, see [self-hosting documentation](https://www.rivet.dev/docs/self-hosting/).\n\n## Features\n\nRivetKit provides everything you need to build fast, scalable, and real-time applications without the complexity.\n\n- **Long-Lived, Stateful Compute**: Like AWS Lambda but with memory and no timeouts\n- **Blazing-Fast Reads \u0026 Writes**: State stored on same machine as compute  \n- **Realtime, Made Simple**: Built-in WebSockets and SSE support\n- **Store Data Near Your Users**: Deploy to the edge for low-latency access\n- **Infinitely Scalable**: Auto-scale from zero to millions without configuration\n- **Fault Tolerant**: Automatic error handling and recovery built-in\n\n## Examples\n\n- AI Agent — [GitHub](https://github.com/rivet-dev/rivetkit/tree/main/examples/ai-agent) · [StackBlitz](https://stackblitz.com/github/rivet-dev/rivetkit/tree/main/examples/ai-agent)\n- Chat Room — [GitHub](https://github.com/rivet-dev/rivetkit/tree/main/examples/chat-room) · [StackBlitz](https://stackblitz.com/github/rivet-dev/rivetkit/tree/main/examples/chat-room)\n- Collab (Yjs) — [GitHub](https://github.com/rivet-dev/rivetkit/tree/main/examples/crdt) · [StackBlitz](https://stackblitz.com/github/rivet-dev/rivetkit/tree/main/examples/crdt)\n- Multiplayer Game — [GitHub](https://github.com/rivet-dev/rivetkit/tree/main/examples/game) · [StackBlitz](https://stackblitz.com/github/rivet-dev/rivetkit/tree/main/examples/game)\n- Local-First Sync — [GitHub](https://github.com/rivet-dev/rivetkit/tree/main/examples/sync) · [StackBlitz](https://stackblitz.com/github/rivet-dev/rivetkit/tree/main/examples/sync)\n- Rate Limiter — [GitHub](https://github.com/rivet-dev/rivetkit/tree/main/examples/rate) · [StackBlitz](https://stackblitz.com/github/rivet-dev/rivetkit/tree/main/examples/rate)\n- Per-User DB — [GitHub](https://github.com/rivet-dev/rivetkit/tree/main/examples/database) · [StackBlitz](https://stackblitz.com/github/rivet-dev/rivetkit/tree/main/examples/database)\n- Multi-Tenant SaaS — [GitHub](https://github.com/rivet-dev/rivetkit/tree/main/examples/tenant) · [StackBlitz](https://stackblitz.com/github/rivet-dev/rivetkit/tree/main/examples/tenant)\n- Stream Processing — [GitHub](https://github.com/rivet-dev/rivetkit/tree/main/examples/stream) · [StackBlitz](https://stackblitz.com/github/rivet-dev/rivetkit/tree/main/examples/stream)\n\n## Runs Anywhere\n\nDeploy RivetKit anywhere - from serverless platforms to your own infrastructure with RivetKit's flexible runtime options. Don't see the runtime you want? [Add your own](https://rivet.dev/docs/drivers/build-your-own/).\n\n### All-In-One\n- \u003cimg src=\".github/media/platforms/rivet-white.svg\" height=\"16\" alt=\"Rivet\" /\u003e\u0026nbsp;\u0026nbsp;[Rivet](https://rivet.dev/docs/hosting-providers/rivet-cloud/)\n- \u003cimg src=\".github/media/platforms/cloudflare-workers.svg\" height=\"16\" alt=\"Cloudflare Workers\" /\u003e\u0026nbsp;\u0026nbsp;[Cloudflare Workers](https://rivet.dev/docs/hosting-providers/cloudflare-workers/)\n\n### Compute\n- \u003cimg src=\".github/media/platforms/vercel.svg\" height=\"16\" alt=\"Vercel\" /\u003e\u0026nbsp;\u0026nbsp;[Vercel](https://github.com/rivet-dev/rivetkit/issues/897) *(On The Roadmap)*\n- \u003cimg src=\".github/media/platforms/aws-lambda.svg\" height=\"16\" alt=\"AWS Lambda\" /\u003e\u0026nbsp;\u0026nbsp;[AWS Lambda](https://github.com/rivet-dev/rivetkit/issues/898) *(On The Roadmap)*\n- \u003cimg src=\".github/media/platforms/supabase.svg\" height=\"16\" alt=\"Supabase\" /\u003e\u0026nbsp;\u0026nbsp;[Supabase](https://github.com/rivet-dev/rivetkit/issues/905) *(Help Wanted)*\n- \u003cimg src=\".github/media/platforms/bun.svg\" height=\"16\" alt=\"Bun\" /\u003e\u0026nbsp;\u0026nbsp;[Bun](https://rivet.dev/docs/actors/quickstart/backend/)\n- \u003cimg src=\".github/media/platforms/nodejs.svg\" height=\"16\" alt=\"Node.js\" /\u003e\u0026nbsp;\u0026nbsp;[Node.js](https://rivet.dev/docs/actors/quickstart/backend/)\n\n### Storage\n- \u003cimg src=\".github/media/platforms/postgres.svg\" height=\"16\" alt=\"Postgres\" /\u003e\u0026nbsp;\u0026nbsp;[Postgres](https://github.com/rivet-dev/rivetkit/issues/899) *(Help Wanted)*\n- \u003cimg src=\".github/media/platforms/file-system.svg\" height=\"16\" alt=\"File System\" /\u003e\u0026nbsp;\u0026nbsp;[File System](https://rivet.dev/docs/drivers/file-system/)\n- \u003cimg src=\".github/media/platforms/memory.svg\" height=\"16\" alt=\"Memory\" /\u003e\u0026nbsp;\u0026nbsp;[Memory](https://rivet.dev/docs/drivers/memory/)\n\n## Works With Your Tools\n\nSeamlessly integrate RivetKit with your favorite frameworks, languages, and tools. Don't see what you need? [Request an integration](https://github.com/rivet-dev/rivetkit/issues/new).\n\n### Frameworks\n- \u003cimg src=\".github/media/clients/react.svg\" height=\"16\" alt=\"React\" /\u003e\u0026nbsp;\u0026nbsp;[React](https://rivet.dev/docs/clients/react/)\n- \u003cimg src=\".github/media/clients/nextjs.svg\" height=\"16\" alt=\"Next.js\" /\u003e\u0026nbsp;\u0026nbsp;[Next.js](https://rivet.dev/docs/clients/nextjs/)\n- \u003cimg src=\".github/media/clients/vue.svg\" height=\"16\" alt=\"Vue\" /\u003e\u0026nbsp;\u0026nbsp;[Vue](https://github.com/rivet-dev/rivetkit/issues/903) *(Help Wanted)*\n\n### Clients\n- \u003cimg src=\".github/media/clients/javascript.svg\" height=\"16\" alt=\"JavaScript\" /\u003e\u0026nbsp;\u0026nbsp;[JavaScript](https://rivet.dev/docs/clients/javascript/)\n- \u003cimg src=\".github/media/clients/typescript.svg\" height=\"16\" alt=\"TypeScript\" /\u003e\u0026nbsp;\u0026nbsp;[TypeScript](https://rivet.dev/docs/clients/javascript/)\n- \u003cimg src=\".github/media/clients/python.svg\" height=\"16\" alt=\"Python\" /\u003e\u0026nbsp;\u0026nbsp;[Python](https://github.com/rivet-dev/rivetkit/issues/902) *(Help Wanted)*\n- \u003cimg src=\".github/media/clients/rust.svg\" height=\"16\" alt=\"Rust\" /\u003e\u0026nbsp;\u0026nbsp;[Rust](https://rivet.dev/docs/clients/rust/)\n\n### Integrations\n- \u003cimg src=\".github/media/integrations/hono.svg\" height=\"16\" alt=\"Hono\" /\u003e\u0026nbsp;\u0026nbsp;[Hono](https://rivet.dev/docs/integrations/hono/)\n- \u003cimg src=\".github/media/integrations/vitest.svg\" height=\"16\" alt=\"Vitest\" /\u003e\u0026nbsp;\u0026nbsp;[Vitest](https://rivet.dev/docs/integrations/vitest/)\n- \u003cimg src=\".github/media/integrations/better-auth.svg\" height=\"16\" alt=\"Better Auth\" /\u003e\u0026nbsp;\u0026nbsp;[Better Auth](https://rivet.dev/docs/integrations/better-auth/)\n- \u003cimg src=\".github/media/platforms/vercel.svg\" height=\"16\" alt=\"AI SDK\" /\u003e\u0026nbsp;\u0026nbsp;[AI SDK](https://github.com/rivet-dev/rivetkit/issues/907) *(On The Roadmap)*\n\n### Local-First Sync\n- \u003cimg src=\".github/media/integrations/livestore.svg\" height=\"16\" alt=\"LiveStore\" /\u003e\u0026nbsp;\u0026nbsp;[LiveStore](https://github.com/rivet-dev/rivetkit/issues/908) *(Available In August)*\n- \u003cimg src=\".github/media/integrations/zerosync.svg\" height=\"16\" alt=\"ZeroSync\" /\u003e\u0026nbsp;\u0026nbsp;[ZeroSync](https://github.com/rivet-dev/rivetkit/issues/909) *(Help Wanted)*\n- \u003cimg src=\".github/media/integrations/tinybase.svg\" height=\"16\" alt=\"TinyBase\" /\u003e\u0026nbsp;\u0026nbsp;[TinyBase](https://github.com/rivet-dev/rivetkit/issues/910) *(Help Wanted)*\n- \u003cimg src=\".github/media/integrations/yjs.svg\" height=\"16\" alt=\"Yjs\" /\u003e\u0026nbsp;\u0026nbsp;[Yjs](https://github.com/rivet-dev/rivetkit/issues/911) *(Help Wanted)*\n\n## Local Development with the Rivet Inspector\n\nRivet Inspector is like like Chrome DevTools, but for all of your stateful serverless needs. [Visit the Inspector →](https://inspect.rivet.dev)\n\n- **Live State Inspection**: View and edit your actor state in real-time as messages are sent and processed\n- **REPL**: Debug your actor in real-time - call actions, subscribe to events, and interact directly with your code\n- **Connection Inspection**: Monitor active connections with state and parameters for each client\n- **Hot Reload Code Changes**: See code changes instantly without restarting - modify and test on the fly\n\n![Rivet Inspector](.github/media/screenshots/studio/simple.png)\n\n## Community \u0026 Support\n\nJoin thousands of developers building with RivetKit today:\n\n- [Discord](https://rivet.dev/discord) - Chat with the community\n- [X/Twitter](https://x.com/rivet_gg) - Follow for updates\n- [Bluesky](https://bsky.app/profile/rivet.gg) - Follow for updates\n- [GitHub Discussions](https://github.com/rivet-dev/rivetkit/discussions) - Ask questions and share ideas\n- [GitHub Issues](https://github.com/rivet-dev/rivetkit/issues) - Report bugs and request features\n- [Talk to an engineer](https://rivet.dev/talk-to-an-engineer) - Discuss your technical needs, current stack, and how Rivet can help with your infrastructure challenges\n\n## License\n\n[Apache 2.0](LICENSE)\n\n\n","funding_links":[],"categories":["Misc","Libraries","Others","miscellaneous"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frivet-dev%2Frivetkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frivet-dev%2Frivetkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frivet-dev%2Frivetkit/lists"}