Schema-first RPC for the polyglot era

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.

TS TypeScript Vanilla Client Go Server + Types contract.ts xRPC DSL (Zod-based) Single source of truth TS TypeScript Express (Planned) Kotlin Spring Boot (Planned)

One schema. Every platform.

Try it now

$ npm install -g @xrpckit/cli
$ xrpc --help

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.

1
Define Your API Contract
api.ts
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()
    })
  })
});
Like OpenAPI but in TypeScript
Like tRPC but cross-platform
2
Generate Server & Client
Go Server
type GetUserInput struct {
  ID string `json:"id"`
}

func (h *Handler) GetUser(
  input GetUserInput,
) (*GetUserOutput, error) {
  // Your logic here
}
TS TypeScript Client
import { client } from './client';

async function getProfile(userId: string) {
  const user = await client
    .user.getUser({ id: userId });

  return user.name;
}
3
Ship With Confidence
Change the schema, both sides update
TypeScript catches mismatches at build time
Go validates requests automatically
Zero runtime type drift. Ever.

Get started in seconds

Generate a Go server and TypeScript client from a single schema.

Terminal
# 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

Ready to ditch the type mismatches?

Join developers building type-safe APIs across languages.