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

@czap/command

v0.3.1

Published

Shared capsule command registry + dispatcher — one command truth for the CLI and MCP adapters

Readme

@czap/command

The shared command catalog and dispatcher behind the czap CLI and the MCP server — one definition of every command's name and input schema (plus the handler, for commands that execute here; terminal-owned verbs are descriptor-only), so both surfaces stay in sync by construction.

You usually don't install this directly — it arrives as a dependency of @czap/cli and @czap/mcp-server. Install one of those instead unless you're building your own adapter (a new protocol skin) over the same commands.

Install

pnpm add @czap/cli   # brings @czap/command with it

This package declares effect (>= 4.0.0-beta.0) as a peer dependency: pnpm add effect@beta.

30 seconds

import { commandRegistry, CommandDispatcher } from '@czap/command';

const dispatcher = CommandDispatcher.make(commandRegistry);

const result = await dispatcher.dispatch(
  { name: 'glossary', args: { term: 'boundary' } },
  {}, // CommandContext — pure commands like glossary need no host capabilities
);

console.log(result.status, result.payload);

Logs ok and a payload containing the glossary entry for "boundary". The dispatcher never throws across this seam: an unknown command name returns { status: 'failed', payload: { error: 'unknown_command' } } instead of an exception.

Where it sits

This is the core of the command layer. It depends on @czap/core (command descriptor and result types) and @czap/assets (the asset-analysis handlers). The main entry is pure; anything that touches the host — process spawning, the ffmpeg render backend, the input-hash idempotency cache, capsule-manifest resolution — lives behind the @czap/command/host subpath (Node) and @czap/command/host-browser (browser, including the WebMCP projection), so importing the catalog never drags in child_process. Terminal-owned verbs like doctor, gauntlet, and ship appear here as descriptor-only catalog entries; their execution lives in @czap/cli. See the package surfaces map for the full layout.

If it does nothing

Dispatching a catalog command that has no handler here (a CLI-owned verb such as doctor) returns a structured failure with payload.error: 'no_registry_handler' — nothing throws and nothing prints. Run those verbs through @czap/cli, which owns their execution.

Docs


Part of LiteShip — powered by the CZAP engine (Content-Zoned Adaptive Projection), distributed as @czap/* packages.