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

@komatikai/trailhead

v4.5.7

Published

Trailhead CLI — setup wizard and utilities for the Trailhead deployment gate

Readme

Trailhead CLI

Interactive setup wizard and diagnostics for Trailhead. Generates .trailhead.yml, validates policy files, compares configured CI check names against GitHub, and runs the submission gate (validate-submission).

Install (no build required)

The published npm package ships a prebuilt JS bundle (dist/index.js) plus @swc/core as a runtime dependency (one platform-native binding installed via npm optionalDependencies — ~25 MB download, not 135 MB). No repo clone or local build required.

npx @komatikai/trailhead init              # interactive — pick solo / team / agent / ops
npx @komatikai/trailhead init --preset solo
npx @komatikai/trailhead doctor --offline

Pin a version for CI:

npm install -D @komatikai/[email protected]
npx trailhead validate-submission --input bundle.json

Persona guide: docs/getting-started.md · Presets: presets/README.md

Migrating from vendored cli-dist

Komatik agents and other repos that vendor trailhead/cli-dist/ can replace the copy with an npm pin:

npm install -D @komatikai/trailhead@<tag>
# invoke: npx trailhead validate-submission …

Set TRAILHEAD_CLI=$(npm root)/.bin/trailhead (or npx trailhead) in shadow-compare harnesses instead of a repo-relative cli/dist/index.js.

Usage

trailhead init

Interactive wizard — no GitHub token required. Creates .trailhead.yml and .github/workflows/trailhead.yml.

trailhead doctor

Validates .trailhead.yml (or legacy .deployguard.yml) and optionally compares contexts[].ci.required_checks against recent GitHub check runs.

# Config-only validation (no GitHub API)
trailhead doctor --offline

# Compare against GitHub (needs token + repo)
GITHUB_TOKEN=ghp_... trailhead doctor --repo owner/repo

# Machine-readable output
trailhead doctor --json

| Flag | Description | | --------------------- | -------------------------------------- | | --path <dir> | Directory to scan (default: cwd) | | --repo <owner/name> | GitHub repository for check lookup | | --token <token> | GitHub token (default: GITHUB_TOKEN) | | --ref <sha> | Commit SHA for check runs | | --offline | Skip GitHub API comparison | | --json | Output report as JSON |

Exit code 0 when there are no errors; 1 when config is missing/invalid or structural errors are found. Warnings do not fail the command.

trailhead validate-submission

Runs the canonical Gate 1 engine on a JSON payload of files (used by CI integrations and MCP). See cli/src/index.ts for input shape.

Development (this repo)

Source lives in cli/src/; shared modules are copied from src/ at build time. Do not commit cli/dist/ — CI and the release workflow build the bundle.

# From repo root
npm ci
npm run build:cli
node cli/dist/index.js doctor --offline --path .

# Typecheck CLI sources only
cd cli && npm ci && npm run typecheck

Bundle pipeline: scripts/build-cli-bundle.mjsncc with @swc/core external (Action bundle still vendors swc.*.node via copy-swc-bindings.mjs).

Publishing

On tag push (v*), .github/workflows/release.yml runs npm run build:cli, npm ci --omit=dev in cli/, then publishes @komatikai/trailhead. The npm tarball ships dist/ plus @swc/core in dependencies (platform binding resolved at install).