silgi

The fastest end-to-end type-safe RPC framework for TypeScript — compiled pipelines, single package, every runtime
29,920 35
Install
npm install silgi
Latest Version:0.53.6
Vue:3
License:MIT
Last Updated:Apr 27, 2026
Links: GitHub  ·  npm
Maintainer: productdevbook

End-to-end type-safe RPC framework for TypeScript. Single package — server, client, 15 plugins, 14 adapters. Full docs at silgi.dev.

Install

pnpm add silgi
# or: npm install silgi / yarn add silgi / bun add silgi

Requires Node.js >=24.

Minimal example

import { silgi } from 'silgi'

const k = silgi({
  context: (req) => ({ now: Date.now() }),
})

const hello = k.$resolve(({ ctx }) => ({ message: 'hi', at: ctx.now }))

const router = k.router({ hello })

export default k.handler(router)

Export handler from any Fetch-compatible runtime (Next.js App Router, SvelteKit, Remix, Astro, SolidStart, Hono, srvx, Bun, Deno, Cloudflare Workers, AWS Lambda via the hono adapter, …). Dedicated adapters for Express, Nitro, NestJS, and Node's raw http live under silgi/express, silgi/nextjs, silgi/sveltekit, etc.

Run a standalone server:

await k.serve(router, { port: 3000 })

Documentation

  • silgi.dev — user guide, recipes, API reference.
  • CONTRIBUTING.md — dev setup, commands, PR checklist.
  • ARCHITECTURE.md — request pipeline, module layout, performance invariants.
  • SECURITY.md — threat model, reporting policy, security features.
  • docs/rfcs/0001-de-magic.md — the refactor that removed module-global mutable state, explicit schema converter injection, and per-instance context bridges.

Credits

  • oRPC — Pipeline architecture, client proxy, error handling, contract-first workflow
  • tRPC — Router/procedure model, end-to-end type inference
  • Elysia — Sucrose-style static handler analysis

License

MIT

Related Packages

nuxt-api-contract

Type-safe API contracts between Nitro server routes and the Nuxt client.

3,144 0
sitegate

A secure, self-hosted password gate for staging and preview websites.

1,488 0
nuxt-procedures

Nuxt module to define and easily consume your backend API in a validated and typ...

1,678 2
@jfungus/ratelimit-h3

H3/Nitro middleware for @jfungus/ratelimit

505 9
nuxt-safe-action

Type-safe Nuxt actions with advanced forms, declared business errors and mutatio...

976 1

Version History

Version Released License
0.53.6 MIT
0.53.5 MIT
0.53.4 MIT
0.53.3 MIT
0.53.2 MIT
Pre-releases (15)
Version Released License
0.1.0-beta.15 MIT
0.1.0-beta.14 MIT
0.1.0-beta.13 MIT
0.1.0-beta.12 MIT
0.1.0-beta.11 MIT