Getting Started
Overview
Silgi is a modern, powerful, and type-safe TypeScript framework designed for microservice architectures. It provides end-to-end type safety, prioritizes developer experience and maintainability, and makes it much easier to build scalable, maintainable, and reliable backend services.
Core components of Silgi:
- silgi.config.ts: The main file where you manage all your project configuration and modules.
- Development Environment: Fast development with automatic type generation, hot reloading, and a robust CLI.
- Runtime: The system that runs your type-safe services, handling validation and error management.
- Module Ecosystem: Easily extend and customize your project with modules.
Silgi comes with smart defaults and strong opinions. You can explore all features in the Features Guide. For integration with other frameworks or tools, see the Modules section, and for custom project settings, check Configuration.
A fully type-supported, extensible infrastructure is also available via the Plugin API and Module API.
You can find the philosophy and motivation behind Silgi in the Why Silgi? section.
TypeScript Support
Silgi is built from the ground up with TypeScript and provides end-to-end type safety out of the box. It automatically generates TypeScript types from your service schemas and ensures correct propagation of input/output types throughout your application.
TypeScript 5.8+ is recommended for the best experience. Silgi fully leverages advanced TypeScript features (template literal types, conditional types, module augmentation).
Try Silgi Online
Coming soon!
Create Your First Silgi Project
Compatibility Note
Silgi requires Node.js 22+ and works only with the ESM module system. CommonJS is not supported.
pnpm create silgi
bun create silgi
npm create silgi@latest
yarn create silgi
Follow the on-screen instructions after running the command!
For all templates and details, see create-silgi: nuxt
, nitro
, h3
, and more.
You can use .
as the project name to install in the current directory.
Community Templates
create-silgi provides quick-start templates for popular use cases. You can also check out community templates that include different frameworks and tools.
If you find a template at https://github.com/user/project
, you can try it online at https://github.stackblitz.com/user/project
(add .stackblitz
after github
in the URL).
Alternatively, you can quickly clone a template using degit:
npx degit user/project#main my-project
cd my-project
npm install
npm run dev
Manual Installation
To add Silgi to an existing project:
- Install the Silgi package:
pnpm add silgi
bun add silgi
npm install silgi
yarn add silgi
- Run the Silgi init command to bootstrap your project:
pnpm silgi init
bun silgi init
npm silgi init
yarn silgi init
A basic project structure will be created and you can start developing.