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

@sdk-usage/cli

v0.4.0

Published

Command-line interface for scanning projects and collecting SDK usage as JSON.

Readme

✨ Features

  • Runs the JSX, JavaScript, and TypeScript collection plugins.
  • Scans JavaScript, JSX, TypeScript, and TSX source files under the current directory.
  • Filters usage by import module names and file patterns.
  • Reports source locations, package names, and dependency versions.
  • Groups usages by name, with counts and nested source locations.
  • Writes a contextual usage report and formatted JSON to standard output. Errors go to standard error.

🚀 Usage

Requires Node.js 22.5 or newer because @sdk-usage/core uses node:path.matchesGlob.

Run without installing:

pnpm dlx @sdk-usage/cli

Or install it in a project:

pnpm add -D @sdk-usage/cli
pnpm exec sdk-usage

In a terminal, raw JSON starts collapsed. Type r and press Enter to expand or collapse it; type s and press Enter to save the raw JSON to sdk-usage.json in the scanned directory, or type q and press Enter to quit. Saving replaces the file if it already exists. When you redirect input or output, you get the full report and JSON without a prompt.

The command scans the current working directory. It excludes .git, node_modules, dist, out, test-like files, and story-like files by default.

CLI options

| Flag | Description | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | --include-modules <module> | Only collect usage from the exact import module name. Repeat to include multiple modules. Omit to include all modules. | | --include-files <pattern> | Match files using a glob pattern relative to each package directory. Repeat to include multiple patterns. These patterns replace the default file patterns; folder exclusions still apply. |

pnpm exec sdk-usage \
  --include-modules "@chakra-ui/react" \
  --include-modules "react" \
  --include-files "**/*.tsx" \
  --include-files "**/*.ts"

Quote file patterns to prevent shell expansion. Patterns follow Node.js path.matchesGlob semantics: dot-prefixed path segments require explicit matches, and a leading ! does not negate a pattern. You can also pass values with =, such as --include-files="**/*.{jsx,tsx}".

Use @sdk-usage/core directly to configure folder exclusions or plugins.

🏗️ Architecture

The CLI wires @sdk-usage/core with the JSX, JavaScript, and TypeScript plugins, consumes the resulting async iterable, and formats the usages and JSON into one report on standard output. See the core documentation to customize scanning.

✍️ Contribution

See the repository contribution guide.

📖 License

MIT