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

@openbrf/theme-tools

v1.1.0

Published

The Open BRF theme package format: manifest, archive, lint and inheritance, as the core checks a theme at install time.

Downloads

690

Readme

@openbrf/theme-tools

The theme package format of Open BRF: the manifest, the archive reader and writer, the lint and inheritance. An instance runs this package when it installs a theme, so a theme repository's CI that runs it sees the same refusal before the theme is published.

The major version is the token contract's. Anything a theme could notice raises it, and an additive change keeps it. 1.x is contract version 1.

Installing

npm install --save-dev @openbrf/theme-tools

It depends on @openbrf/tokens, the token contract a theme's values are checked against.

Linting a packed theme

import { readFile } from "node:fs/promises";
import { lintThemePackage } from "@openbrf/theme-tools";

const result = lintThemePackage(await readFile("example-theme-1.0.0.tgz"));

if (!result.ok) {
  console.error(result.reason, result.issues);
  process.exit(1);
}
if (!result.lint.ok) {
  console.error(result.lint.findings);
  process.exit(1);
}

lintThemePackage reads the archive and lints the manifest with the function the instance runs at install. A theme that extends another theme than the built-in one takes the installed themes it may inherit from as its second argument. The lint refuses a theme with a colour pair below the contrast the contract requires for it, the statutory register's included, one that carries anything executable and one that loads a font from a third party; warnings do not block.

The parts are exported too: parseThemeManifest, lintTheme, resolveThemeChain, readThemeArchive and writeThemeArchive.

In a browser

The archive reader and writer, and lintThemePackage, lintThemeAgainst and readThemePackage built on them, run in Node only. A bundler that resolves the browser export condition, as Vite does, gets the package without them, so a theme preview can still parse, lint and resolve a manifest.

Documentation

  • The token contract: what a theme is, the tokens, inheritance, the package format, fonts and view variants.
  • ADR 0020: the public catalog and the published packages.

Licence

AGPL-3.0-only, with the Open BRF Module Exception. A theme written against the token contract is a module under that exception and may be licensed on any terms. Both texts are in the package.