npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@coralstack/cmd-ipc

v0.0.1

Published

A Command IPC framework for multi-process applications and agents

Readme

@coralstack/cmd-ipc

A type-safe Inter-Process Communication (IPC) library for running commands across multiple processes and services.

Full Documentation

Features

  • Command Registry - Central hub for registering and executing commands with automatic routing across processes
  • Type Safety - Strict mode with full TypeScript inference via Valibot schemas, or flexible loose mode
  • Channel Architecture - Pluggable communication channels (MessagePort, HTTP, WebSocket, etc.)
  • @Command Decorator - Register class methods as commands with decorators
  • Event System - Broadcast events across processes with optional schema validation
  • Multi-Process Routing - Hybrid Tree-Mesh architecture with automatic command escalation

Installation

npm install @coralstack/cmd-ipc

Quick Start

import { CommandRegistry } from '@coralstack/cmd-ipc'

const registry = new CommandRegistry()

// Register a command
await registry.registerCommand('hello.world', async ({ name }) => {
  return { message: `Hello ${name}` }
})

// Execute the command
const response = await registry.executeCommand('hello.world', { name: 'World' })
console.log(response.message) // "Hello World"

With Schemas (Strict Mode)

import { CommandRegistry, type CommandSchemaMap } from '@coralstack/cmd-ipc'
import * as v from 'valibot'

const commandSchemaMap = {
  'math.add': {
    request: v.object({ a: v.number(), b: v.number() }),
    response: v.number(),
  },
} satisfies CommandSchemaMap

const registry = new CommandRegistry({ commandSchemaMap })

const result = await registry.executeCommand('math.add', { a: 1, b: 2 })
// result is typed as number

With Decorators

import { Command, registerCommands, CommandRegistry } from '@coralstack/cmd-ipc'

class MathCommands {
  @Command('math.add')
  add({ a, b }: { a: number; b: number }): number {
    return a + b
  }
}

const registry = new CommandRegistry()
registerCommands([new MathCommands()], registry)

Multi-Process Communication

import { CommandRegistry, MessagePortChannel } from '@coralstack/cmd-ipc'

// Main process
const mainRegistry = new CommandRegistry({ id: 'main' })
const { port1, port2 } = new MessageChannel()
const channel = new MessagePortChannel('worker', port1)
mainRegistry.registerChannel(channel)

// Worker process (routes unknown commands to main)
const workerRegistry = new CommandRegistry({
  id: 'worker',
  routerChannel: 'main',
})

Exports

| Export | Description | | ----------------------------- | ---------------------------------------------------- | | @coralstack/cmd-ipc | Core library - registry, channels, commands, schemas | | @coralstack/cmd-ipc/testing | Test utilities including TestLogger |

Development

yarn build       # Build with tsup (ESM + CJS)
yarn typecheck   # TypeScript type checking
yarn test        # Run tests

License

MIT