Define once.
Generate everywhere.
xRPC turns your TypeScript + Zod schemas into Go servers and TypeScript clients today. More targets (ts-express, Kotlin, Python) are planned.
One schema. Every platform.
Try it now
Type safety shouldn't stop at language boundaries
You've got a TypeScript backend. A Go microservice. A mobile app in Kotlin. Every time you change an endpoint, you're updating types in three places. One typo, and you're debugging production at 2am.
What if you could define your API once and have type-safe code generated for every language?
Built for teams who ship fast
The simplicity of tRPC meets true cross-platform capability.
One schema, every language
Write your API contract in TypeScript with Zod. Generate perfectly typed clients and servers for Go, Kotlin, Python, and more.
Catch bugs at compile time
Type mismatches become compiler errors, not runtime crashes. Sleep better knowing your types are always in sync.
Zero configuration
No YAML files. No code annotations. No build plugins. Just run the CLI and get production-ready code.
Code that feels native
Generated code follows each language's conventions. Go code looks like Go. Kotlin code looks like Kotlin. No weird wrappers.
No runtime dependencies
Generated code is self-contained. Standard library only. Ship it to production without adding bloat to your stack.
Built-in validation
Your Zod constraints become runtime validation in every language. min, max, email, uuid - it all just works.
Any frontend. Any backend. One source of truth.
Define your API contract once. Generate type-safe servers and clients for any platform.
const user = createEndpoint({
getUser: query({
input: z.object({
id: z.string().uuid()
}),
output: z.object({
id: z.string(),
name: z.string().min(1),
email: z.string().email()
})
})
});
type GetUserInput struct {
ID string `json:"id"`
}
func (h *Handler) GetUser(
input GetUserInput,
) (*GetUserOutput, error) {
// Your logic here
}
import { client } from './client';
async function getProfile(userId: string) {
const user = await client
.user.getUser({ id: userId });
return user.name;
}
Get started in seconds
Generate a Go server and TypeScript client from a single schema.
# Install the CLI
npm install -g @xrpckit/cli
# Generate Go server + TypeScript client from your schema
xrpc generate --targets go-server,ts-client --input src/contract.ts
Generated 5 files in 0.3s
# xrpc/types.go, xrpc/router.go, xrpc/validation.go
# xrpc/client.ts, xrpc/types.ts
Targets
xRPC generates idiomatic code for multiple platforms from your Zod schema.
Each target produces self-contained code with clear runtime requirements.
Vanilla TS client with fetch + Zod validation. Express server target is planned as ts-express.
Idiomatic Go with net/http handlers, struct validation, and JSON marshaling. Go client target is planned.
Spring Boot integration with data classes, validation annotations, and controller generation.
FastAPI servers and httpx clients with Pydantic models.
Ready to ditch the type mismatches?
Join developers building type-safe APIs across languages.