Skip to content

postgresdk

Point it at a Postgres schema. Get a fully typed Hono API server and TypeScript client SDK — includes, Zod, transactions, vector & trigram search, soft-delete, and auth.

postgresdk is a CLI + library that introspects your PostgreSQL schema and generates two things:

  • A Hono API server — typed routes, Zod validation, auth middleware, soft/hard delete, vector & trigram search.
  • A TypeScript client SDK — typed CRUD, eager-loading includes, atomic transactions, type-safe where filtering, and pagination.

Regenerate any time your schema changes. No hand-written glue, no drift.

Code is the source of truth

The reference docs are generated from postgresdk’s own source — the CLI, the Config type, and the WHERE operators — so they can’t go stale.

See real output

The Generated API example is a real CONTRACT.md produced by running postgresdk against a fixture schema.

Typed end to end

Nested includes infer their own return types. where operators reject the wrong column types at compile time.

This site is designed to be consumed by agents that build skills on top of postgresdk. The llms.txt files are generated at build time: