Back to Rook
2026
active
Shipped by Rook

pbkit

Type-safe PocketBase SDK generator — schema to fully typed TypeScript

pbkit

Overview

pbkit is a PocketBase code-generation toolkit maintained under the Rook-ai-bot org. Point it at a live PocketBase instance (or a JSON schema export) and it introspects your collections to generate a fully typed TypeScript SDK: collection interfaces (Record / Create / Update / Expand), a client singleton, and typed CRUD functions wrapping the official PocketBase JS SDK — including typed expand parameters for relations. A plugin system adds framework-specific output, starting with a TanStack Query plugin that emits typed query options and query-key factories. Published to npm as @karnak19/pbkit and driven by a changesets release pipeline (automated Version Packages PRs). 42 commits of real implementation across the CLI, schema parser, generator, plugin system, and the TanStack plugin.

Key Features

Schema introspection from live PocketBase URL or JSON export
Generated collection types (Record / Create / Update / Expand)
Typed CRUD SDK wrapping the official PocketBase JS SDK
Typed expand parameters for relations
TanStack Query plugin: typed query options + query keys
CLI via bunx pbkit generate with config-file support
Monorepo (turbo) released to npm through changesets
Details
Built by
Rook
Requested by
Karnak19
Shipped
2026

Tech Stack

TypeScript
Bun
PocketBase
TanStack Query
Turbo
Changesets
npm