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

pncat

v0.11.1

Published

A unified cli tool that enhances package managers catalogs feature.

Readme

npm version npm downloads JSDocs License

pnpm add -D pncat

pnpm · yarn · bun · vlt

  • 🚀 Init - Initialize config with optimized rules
  • 🔍 Detect - Scan workspaces for catalogable dependencies
  • 📦 Migrate - Group dependencies by rules automatically
  • ➕ Add - Install dependencies with catalog and workspace support
  • ➖ Remove - Remove dependencies safely from catalogs and packages
  • 🧹 Clean - Remove unused catalog entries
  • ↩️ Revert - Move cataloged dependencies back to package.json

Usage

Init

pncat init
pncat create
pncat setup
pncat config
pncat conf

Initializes your workspace with an optimized config file. It analyzes current workspace dependencies and generates tailored rules for clearer project structure.

Detect

pncat detect
pncat d
pncat scan
pncat check
pncat find

Scans your workspace and lists dependencies that can be moved to catalogs.

Migrate

pncat migrate
pncat mig
pncat move
pncat mv
pncat m

[!NOTE] To refresh catalog groups by rules, run pncat migrate -f. For a clean migration, run pncat revertpncat migrate.

Groups dependencies by rules (for example lint, test, utils) and updates both workspace catalog config and related package.json files.

Default rules are in src/rules.ts. To customize them, create pncat.config.ts in the project root.

Add

pncat add dep
pncat install dep
pncat in dep
pncat i dep

Adds dependencies with interactive prompts and catalog support (credit to @antfu/nip). Also supports adding monorepo workspace packages with the workspace: protocol.

Use --catalog <name> to target a catalog. If omitted, pncat assigns dependencies based on your catalog rules.

Remove

pncat remove dep
pncat rm dep
pncat r dep
pncat uninstall dep
pncat un dep
pncat u dep

Shows which catalog group uses the dependency. After confirmation, removes it from both workspace catalog config and package.json.

To remove a dependency across the monorepo, use pnpm remove dep -r or pnpm remove dep --recursive.

Clean

pncat clean
pncat cl
pncat c
pncat prune

Finds unused catalog dependencies and removes them from workspace catalog config.

Revert

pncat revert
pncat rev
pncat restore
pncat undo

Moves cataloged dependencies back to package.json. Useful during monorepo restructuring or migration.

You can also revert specific dependencies:

pncat revert dep
pncat rev dep
pncat restore dep
pncat undo dep

Configuration

Run pncat init to generate optimized rules from your current workspace, or create pncat.config.ts manually:

import { defineConfig, mergeCatalogRules } from 'pncat'

export default defineConfig({
  // To extend defaults instead: catalogRules: mergeCatalogRules([...])
  catalogRules: [
    {
      name: 'vue',
      match: ['vue', 'vue-router', 'pinia'],
      // Smaller number = higher priority
      priority: 15,
      // Advanced: version-specific rules
      specifierRules: [
        { specifier: '<3.0.0', suffix: 'legacy', match: ['vue'] }
      ]
    }
  ],
  // Controls version-range processing
  specifierOptions: {
    skipComplexRanges: true,
    allowPreReleases: true,
    allowWildcards: false,
    allowNpmAliases: true
  },
  // Save exact versions instead of semver operators
  saveExact: true,
  // Hook after command completion (string, function, or array)
  postRun: 'eslint --fix "**/package.json" "**/pnpm-workspace.yaml"'
})

Catalog Rules:

  • name: Catalog name (required)
  • match: Packages to include, supports RegExp (required)
  • priority: Smaller number = higher priority (optional)
  • specifierRules: Version-specific rules (optional)
    • specifier: Semver range like >=3.0.0, <2.0.0 (required)
    • match: Packages this rule applies to (optional, defaults to parent match)
    • name: Full catalog name (takes priority over suffix)
    • suffix: Catalog suffix (for example legacy, modern)

Specifier Options (optional):

  • skipComplexRanges: Skip complex ranges like ||, -, >= (default: true)
  • skipRangeTypes: Range types to skip (overrides skipComplexRanges)
    • '||': Logical OR (for example ^3.0.0 || ^4.0.0)
    • '-': Hyphen range (for example 1.2.3 - 2.3.4)
    • '>=', '<=', '>', '<': Comparison ranges
    • 'x': Wildcard (for example 3.x)
    • '*': Any version
    • 'pre-release': Beta/alpha/rc versions
  • allowPreReleases: Allow beta/alpha/rc versions (default: true)
  • allowWildcards: Allow wildcard versions like 3.x, * (default: false)
  • allowNpmAliases: Allow npm alias specifiers like npm:@foo/bar@^1 (default: true)

Why pncat?

In monorepos, keeping dependency versions consistent across packages is important. Grouping dependencies improves project readability and team collaboration.

pnpm catalog support is still limited. For example, it does not provide built-in flows to add or migrate dependencies into specific groups. Managing catalogs manually across a workspace is slow and error-prone, so pncat fills this gap.

When migrating packages in a catalog-based monorepo, you also need to maintain workspace catalog config and remove outdated catalog entries. clean and revert automate this part.

Inspiration

This project is inspired by and builds on:

  • taze - monorepo I/O utilities for reading and parsing workspace config and package.json files
  • @antfu/nip - interactive prompt and UX inspiration for dependency workflows

Special thanks to @antfu and his article Categorizing Dependencies, which strongly influenced this tool.

Related Projects

Contributors

Contributors

License

MIT License © jinghaihan