Skip to content

kkRPC

RPC Everything with TypeScript

kkRPC Banner

kkrpc lets two JavaScript or TypeScript runtimes call each other through type-safe proxy objects. Expose an API on one side, wrap a transport on the other side, and call remote functions, nested methods, properties, and callbacks like local code.

The stable API is built on native Transport<RPCMessage> objects. The core entry is browser-safe; runtime transports and optional peer dependencies live in subpath exports.

Type-safe proxies

Remote APIs keep TypeScript completion and checking, including nested methods and properties.

Bidirectional channels

Evented transports let both sides expose APIs and pass callback arguments.

Native transports

Use stdio, HTTP, WebSocket, workers, iframes, Chrome extension ports, Electron, Tauri, Socket.IO, RabbitMQ, Kafka, Redis Streams, or NATS.

Browser-safe core

kkrpc and kkrpc/browser avoid Node-only imports. Optional integrations stay behind explicit subpaths.

Validation, middleware, metadata

Standard Schema validation, interceptor chains, and request metadata are available as plugins and channel options.

Transfer, relay, inspector

Transfer ownership where supported, bridge two transports, or observe traffic.

Runtime or systemEntry points
Browser and Web Workerkkrpc/browser, kkrpc/worker, kkrpc/iframe
Node.js, Deno, Bun processeskkrpc/stdio, kkrpc/deno
HTTP and WebSocket serverskkrpc/http, kkrpc/ws, kkrpc/ws/hono, kkrpc/ws/elysia
Desktop appskkrpc/electron, kkrpc/tauri
Browser extensionskkrpc/chrome-extension
Message buseskkrpc/socketio, kkrpc/rabbitmq, kkrpc/kafka, kkrpc/redis-streams, kkrpc/nats

The repository includes agent skill docs for AI coding assistants. They describe the stable API, package layout, and language interop implementations.

Terminal window
cp -r skills/kkrpc ~/.claude/skills/
cp -r skills/kkrpc-migration ~/.claude/skills/
cp -r skills/interop ~/.claude/skills/

See the skills/ directory for details.