A type-safe, class-based IPC framework for Electron. Inspired by NestJS.
Define controllers in main, automatically get fully typed APIs in the renderer.
Documentation · Quickstart · Examples
Controller (main process):
import { IpcController, IpcHandle } from "@electron-ipc-bridge/core";
@IpcController("users")
export class UserController {
@IpcHandle()
async getUser(id: string) {
return { id, name: "Alice" };
}
}Renderer:
const user = await window.ipc.users.getUser("123");
console.log(user.name); // "Alice" is fully typed, auto-completed- Zero channel boilerplate: channels are generated automatically
- Auto-generated renderer types: the Vite plugin analyses your controllers and outputs
d.tsdeclarations - Parameter injection:
@Sender(),@Window(),@RawEvent(),@Channel(), and custom decorators - No manual preload wiring:
setupPreload()handles everything - DI-friendly: bring your own container (TypeDI, NestJS, or a simple factory)
npm install @electron-ipc-bridge/core reflect-metadata
npm install -D @electron-ipc-bridge/vite-pluginHead to the Quickstart guide for full setup instructions, including TypeScript config, Vite plugin setup, preload wiring, and your first controller.
Full documentation is available at metacurb.github.io/electron-ipc-bridge.
MIT
