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

@jonloucks/badges-ts

v1.4.3

Published

Node.js badge creator

Readme

@jonloucks/badges-ts

Badges

CI npm version Coverage Badge Typedoc Badge

badges-ts is a TypeScript/Node.js CLI for generating SVG project badges (npm version, coverage, and typedoc) with configurable colors, file paths, and templates.

Installation

npm install @jonloucks/badges-ts

For one-off usage, you can also run with npx.

Quick Start

1) Discover project metadata

npx badges-ts discover

2) Generate badges

npx badges-ts generate --verbose

By default this creates:

  • npm-badge.svg
  • coverage-summary.svg
  • typedoc-badge.svg

3) Apply version artifacts

npx badges-ts apply-version

This updates src/version.ts and creates release notes for the current package version if a release notes file does not already exist.

CLI Commands

  • badges-ts discover — Reads project metadata from package.json.
  • badges-ts generate — Generates npm, coverage, and typedoc badges.
  • badges-ts apply-version — Writes src/version.ts and creates release-notes file from template.
  • badges-ts badges-ts coverage-report — Generates code coverage report.
  • badges-ts badges-ts coverage-gate — Validates code coverage gates.
  • badges-ts version — Prints CLI version.
  • badges-ts help — Prints usage.

Common flags

  • --dry-run, -d — Preview writes without writing files.
  • --quiet, -q — Suppress standard output.
  • --trace, -t — Enable trace logs.
  • --warn, -w — Enable warning logs.
  • --verbose — Enable verbose output.

Configuration

badges-ts supports both environment variables and a project config file (badges-ts.json).

See Configuration Profiles for ready-to-use examples (default, monorepo, and CI-only).

Example:

{
  "kit.badges.folder": "badges",
  "kit.coverage.summary.path": "coverage/coverage-summary.json",
  "kit.coverage.summary.badge.path": "main-coverage.svg",
  "kit.npm.badge.path": "main-npm.svg",
  "kit.typedoc.badge.path": "main-typedoc.svg",
  "kit.template.badge.path": "src/data/badge-template.svg.dat",
  "kit.above.90.percent.color": "#377526",
  "kit.0.percent.color": "#ff0000"
}

The default badge SVG template is custom/original and stored at src/data/badge-template.svg.dat. You can override it with KIT_TEMPLATE_BADGE_PATH:

KIT_TEMPLATE_BADGE_PATH=./my-template.svg npx badges-ts generate

Documentation

Development

npm install
npm run build
npm run test
npm run lint
npm run docs
npm run badges

License

MIT