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

@blue-labs/repository-generator

v3.9.2

Published

Generate (or check) a `BlueRepository.blue` file from a set of package folders containing `.blue` and `.dev.blue` definitions. It replaces inline type references with BlueIds, computes type-level and repo-level BlueIds, and enforces versioning/lifecycle r

Readme

@blue-labs/repository-generator

Generate (or check) a BlueRepository.blue file from a set of package folders containing .blue and .dev.blue definitions. It replaces inline type references with BlueIds, computes type-level and repo-level BlueIds, and enforces versioning/lifecycle rules.

Usage

CLI

npx ts-node libs/repository-generator/src/bin/blue-repo-generator.ts \
  --repo-root <path-to-packages-root> \
  --blue-repository <output-file> \
  --mode check|write \
  [--verbose] [--json] [--allow-diff]
  • --mode check regenerates in-memory and exits non-zero if BlueRepository.blue is out of date (unless --allow-diff is set).
  • --mode write writes BlueRepository.blue if missing or if the repo BlueId changed.
  • --json (with --mode check) prints a small status payload.
  • --allow-diff (with --mode check) reports a mismatch but exits 0, useful for CI previews where the file is expected to differ.

Programmatic API

import { generateRepository } from '@blue-labs/repository-generator';

const result = generateRepository({
  repoRoot: '/path/to/packages',
  blueRepositoryPath: '/path/to/packages/BlueRepository.blue',
  mode: 'write', // or 'check'
  verbose: true,
});

console.log(result.currentRepoBlueId);
console.log(result.document); // BlueRepositoryDocument

Behaviors & invariants (summary)

  • Supports primitives with hardcoded BlueIds and resolves non-primitive aliases to BlueIds before hashing.
  • Dev types store a single version entry; unchanged dev types keep their previous BlueId/version index.
  • Stable types:
    • Breaking changes (non-optional diffs) are rejected.
    • Stable → dev downgrade is rejected.
    • Stable types cannot depend on dev types.
  • Dependency graph is topo-sorted; aliases are validated and cycles rejected.
  • Output is deterministic (sorted packages/types/versions); repo BlueId covers the packages subtree only.

Tests

npx nx test repository-generator --skip-nx-cache
npx nx lint repository-generator
npx nx typecheck repository-generator