What is Kizuna.js?
A spec-driven framework for building fully typed REST APIs in TypeScript, where your route declarations produce the validation, the documentation, the clients, and the AI tools.
You write routes, each a method, a path, the Zod schemas it takes and returns, and the handler that serves it:
That route answers exactly what it declared:
kizuna.config.ts collects your routes into the API you mount on your adapter. It validates every request against those schemas and answers failures as Problem Details.
The same declaration is what everything else is written from:
Runs on your framework
The adapter is one line of your config. Handlers get that framework's own typed request and response.
req and res in every handler.
request and reply in every handler.
c in every handler.
request in every handler.
Running somewhere else? Write your own adapter.
Spec-driven
Kizuna follows the RFCs instead of inventing conventions, so your API behaves the way the web already expects. See every spec it follows.
Every error body is RFC 9457, sent as application/problem+json.
401 carries the WWW-Authenticate challenge the identity declares.
Cache-Control, Vary and ETag from what the response declares.
Deprecation and Sunset headers from the route that announces them.
Errors are hard to get right, so Kizuna starts from Problem Details. Add your own fields and anything that speaks the standard still reads it:
Iterate without breaking your apps
Kizuna treats a breaking change as a decision you make, not one you discover in production. kizuna diff compares your routes against a git ref and reports what a change costs, from a renamed route down to a single field that became required. Breaking ones exit 1, so CI fails until someone labels the pull request.
BREAKINGGET /users/:id 200.email removedEasy to extend
Anything Kizuna ships, you can extend yourself with the same tools we used.
Package code you reuse, with routes and jobs that reach every handler and client.
Serve on a runtime Kizuna has never heard of.
Generate a client for a language Kizuna doesn't ship.
Write documents and other files from your routes.
Put your jobs on any queue or scheduler.
Start here
Declare a route, serve it, and call it from a typed client in 8 minutes.
kizuna.config.ts names the framework you serve on and what the API is made of.
A method, a path, its schemas, and the handler that serves it.
Express, Fastify, Hono, or the Next.js App Router.
A credential you accept, and the guard that turns it into the caller.
Write your types and clients, print your routes, and diff an API against a git ref.