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

@legioncodeinc/cli-kit

v0.3.0

Published

Zero-dependency CLI mechanism kit for the Apiary CLI suite

Readme

@legioncodeinc/cli-kit

Zero-dependency CLI mechanism kit for the Apiary CLI suite.

cli-kit consolidates the stable, cross-cutting mechanisms currently re-implemented (and drifting) across the four Apiary CLIs — honeycomb, doctor, hive, nectar — so that a bug fix to, e.g., the Windows-safe exit handshake lands once and propagates to every consumer via a versioned npm dependency. It is deliberately narrow and stable: it holds only the mechanisms that change rarely, not volatile product-specific surface (banner text, telemetry keys, version constants, command tables).

  • Zero runtime dependencies ("dependencies": {}) — the suite's can't-crash-watchdog constraint is load-bearing.
  • ESM only, targeting Node >=22.5.0.
  • Single import path (@legioncodeinc/cli-kit), root-only exports.

Modules

| Module | Scope | |---|---| | color | SGR color helpers honoring NO_COLOR / FORCE_COLOR / TTY. | | shutdown | Windows-safe process teardown for one-shot commands that used fetch. | | exit-codes | The 0 / 1 / 2 exit-code enum and helpers. | | arg-parser | A single shared argv parser (collapses the duplicated bespoke parsers). | | telemetry | isTelemetryOptedOut(toolName) resolver honoring the three env vars. | | usage | Grouped usage-table formatter (verb column + summary column). | | json-output | Canonical JSON output and explicit JSON/color bootstrap coupling. | | confirm | Safe zero-dependency y/N confirmation gate. | | config-dir | Home-anchored Apiary state resolution and one-shot legacy migration. | | package-version | Total nearest-package version lookup for ESM consumers. | | branding | Pure product banner, grouped help, exact credit, and human/JSON version rendering. | | reference-cli | Side-effect-free golden harness for consumer conformance preparation. |

Consumer usage

import {
  confirm,
  declined,
  emitJson,
  migrateLegacyConfig,
  readPackageVersion,
  resolveConfigDir,
  setColorEnabled,
  setJsonMode,
} from "@legioncodeinc/cli-kit";

const json = process.argv.includes("--json");
setColorEnabled();
if (json) setJsonMode();

// Run only from one-shot bootstrap; `run` is excluded by isOneShot internally.
migrateLegacyConfig({ argv: process.argv.slice(2) });
const stateDir = resolveConfigDir("honeycomb");
const version = readPackageVersion(import.meta.url) ?? "unknown";

if (!(await confirm("Continue?", { assumeYes: process.argv.includes("--yes") }))) {
  process.exitCode = declined("Aborted."); // intentional decline exits 0
} else if (json) {
  if (!emitJson({ version, stateDir })) process.exitCode = 1;
}

APIARY_HOME may relocate state only to an absolute path beneath the invoking user's home. Filesystem roots and known system/global directories are rejected with ConfigDirError.

The vendored contract documents are checked against the parent checkout with node scripts/sync-vendored-docs.mjs; use --write to refresh them.

PRD-003 consumers should follow the adoption checklist and the suite command matrix. Reference art is test-fixture data; final art remains product-owned and must be reviewed in each product repository.

References

  • CLI Contract — the normative specification this kit implements.
  • CLI parity audit — the source-grounded adoption audit shipped with the kit.
  • PRD-001 — the PRD scoping the first shipping version.

License

AGPL-3.0-or-later