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

@namzu/cli

v0.1.0

Published

Operator CLI for the Namzu agent platform — namzu doctor + future commands. Dual-purpose: standalone bin (`namzu doctor`) and library (`import { runDoctor } from '@namzu/cli'`).

Downloads

107

Readme

@namzu/cli

Operator CLI for the Namzu agent platform.

Dual-purpose:

  • Standalone binnpx @namzu/cli doctor (or after install: namzu doctor).
  • Libraryimport { runDoctor, registerDoctorCheck } from '@namzu/cli' for embedded usage where consumer code wants to invoke the doctor in its own process so app-registered checks are visible.

Install

pnpm add -D @namzu/cli
# or, for one-off invocations:
pnpm dlx @namzu/cli doctor

Commands

namzu doctor

Run health checks against the local Namzu environment.

namzu doctor                              # human-readable, all categories
namzu doctor --json                       # machine-readable JSON
namzu doctor --category sandbox,runtime   # filter by category
namzu doctor --per-check-timeout 8000     # raise per-check timeout
namzu doctor --verbose                    # include failure detail

Exit codes (sysexits-aligned):

| Code | Name | Meaning | | ---: | --------------------- | ------------------------------------------- | | 0 | EXIT_OK | All checks passed (or no failure produced). | | 1 | EXIT_FAIL | One or more checks reported fail. | | 2 | EXIT_NO_CONFIG | No checks registered (Namzu not set up). | | 70 | EXIT_INTERNAL_ERROR | sysexits EX_SOFTWARE; CLI bug. |

Built-in checks ship intentionally conservative; consumers register their own via registerDoctorCheck():

  • sandbox.platform — darwin sandbox-exec presence; warn on win32; inconclusive on linux.
  • runtime.cwd-writable, runtime.tmpdir-writablefs.access(W_OK) probes.
  • telemetry.installed — pass if @namzu/telemetry is dynamically importable.
  • vault.registered, providers.registered — inconclusive with "register your own" guidance.

Library API

import { runDoctor, registerDoctorCheck, builtInDoctorChecks } from '@namzu/cli'
import { ProviderRegistry } from '@namzu/sdk'

// Register a custom check that walks YOUR provider registry
registerDoctorCheck({
	id: 'app.providers.reachable',
	category: 'providers',
	run: async () => {
		const providers = ProviderRegistry.getAll()
		const results = await Promise.all(
			providers.map((p) => p.doctorCheck?.() ?? { status: 'inconclusive' as const }),
		)
		const failed = results.filter((r) => r.status === 'fail')
		return failed.length > 0
			? { status: 'fail', message: `${failed.length} provider(s) failed reachability` }
			: { status: 'pass', message: `${providers.length} provider(s) reachable` }
	},
})

const report = await runDoctor()
process.exit(report.exit)

Architecture

The doctor's protocol types (DoctorCheck, DoctorCheckResult, DoctorReport, DoctorStatus) live in @namzu/sdk so kernel components (providers, vaults, sandboxes) can implement doctorCheck?() hooks against them. The runtime (registry, runner, output formatting, exit codes) lives here in @namzu/cli because it's operator-facing concerns. This is the ses_007-probe-and-doctor split.

License

MIT