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

strictcli

v0.35.0

Published

TS-native strict CLI framework - declare everything, infer nothing

Downloads

2,471

Readme

strictcli

Strict CLI framework for TypeScript — declare everything, infer nothing.

strictcli takes the opposite stance from convention-over-configuration CLI libraries: every command, flag, argument, type, default, and help string is declared explicitly, and anything left unstated is a hard error at registration time. No implicit defaults, no guessed types, no silently ignored input. The result is a CLI whose behavior is fully determined by its declaration.

This package is the native TypeScript implementation: pure ESM, Node >= 22, with full static type inference from flag declarations all the way to handler arguments — declare flag("count", t.int, { required: true }) and your handler's args.count is a bigint, checked by the compiler.

Install

npm install strictcli

Usage

Types are carriers (t.str, t.bool, t.int, t.float, plus t.list(...) and t.dict(...)) that bind the schema, the runtime parser, and the inferred TypeScript type in one value, so they cannot drift apart:

import { arg, command, createApp, flag, t } from "strictcli";

const build = command("build", {
	help: "Build the project",
	flags: [
		flag("dry-run", t.bool, { help: "Print actions without running", default: true }),
		flag("count", t.int, { help: "How many times to build", required: true }),
	],
	args: [arg("values", t.float, { help: "Input values", variadic: true })],
	handler: (args, ctx) => {
		// Inferred: args.dry_run is boolean, args.count is bigint, args.values is number[]
		ctx.info(`building ${args.count} time(s), dry-run=${args.dry_run}`);
		return 0;
	},
});

const app = createApp("myapp", {
	version: "1.0.0",
	help: "my cool app",
	commands: [build],
});

app.run(process.argv.slice(2));

Features

  • Strict four-type systemstr, bool, int, float, with int backed by bigint for full 64-bit signed integer range and strict parsing (no whitespace, no overflow wraparound).
  • Static handler-arg inference — dash-named flags (--dry-run) arrive as underscore keys (dry_run) with exact types and true optional-key modifiers, derived entirely from the declarations.
  • Mandatory help everywhere — missing help text on any app, group, command, flag, or argument is a registration-time error.
  • Env var and JSON config file resolution — explicit precedence: CLI > env > config > default, with auto-registered config show/set/path/edit subcommands.
  • First-class check system — TOML-declared checks with double-entry registration, tag DSL selection, DAG-ordered execution.
  • MCP server integration — expose commands as Model Context Protocol tools.
  • Schema dump — every app answers --dump-schema with a machine-readable JSON description of its full structure.
  • Groups, passthrough commands, deprecation notices, mutex/co-required/implies dependencies — the complete strictcli surface.

Sibling implementations

strictcli is developed in the smm-h/strictcli monorepo alongside first-class Python (PyPI: strictcli) and Go implementations. All implementations are kept byte-identical in behavior — same error messages, same help output, same parsing rules — enforced by a shared cross-language conformance suite.

License

MIT