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

frakment

v0.3.0

Published

CLI and design system for the frakment component registry

Readme

frakment CLI

npm License

Monochrome design system and component registry CLI.

Requirements

  • Node.js >= 22.12.0
  • Tailwind CSS v4 (@import "tailwindcss"; in your globals.css)

Package managers

The commands below use npx. Every package manager works.

| Package manager | Run | | :-- | :-- | | npm | npx frakment@latest <command> | | pnpm | pnpm dlx frakment@latest <command> | | yarn | yarn dlx frakment@latest <command> | | bun | bunx frakment@latest <command> |

The CLI auto-detects your package manager from the project lockfile when installing dependencies.

Usage

frakment init

npx frakment@latest init

What it does:

  1. Writes components.json at project root (CLI config)
  2. Injects the theme block into globals.css between /* ==== FRAKMENT THEME START/END ==== */ markers (design tokens + 9 @utility + .dark + @custom-variant dark)
  3. Preserves anything outside the markers — your @import statements, overrides, and custom CSS stay untouched
  4. Creates lib/utils.ts (the cn helper) if missing
  5. Installs 6 dependencies: clsx, tailwind-merge, class-variance-authority, radix-ui, lucide-react, motion

Idempotent. Safe to re-run:

  • Existing components.json is preserved unless you choose to overwrite
  • Marker block is replaced in place (no duplicates)
  • Legacy inline theme blocks (from older init versions) are auto-migrated

frakment add <component>

npx frakment@latest add button

Fetches the component (plus all registryDependencies recursively) from the registry, writes all files, and installs any missing npm dependencies.

Flags:

  • --registry <url> — override the registry URL (default: from components.json)

  • --overwrite — overwrite existing files without prompting

  • --dry-run — show planned file and dependency changes without changing the project

  • --skip-dependencies — write component files without installing missing npm dependencies

frakment list

npx frakment@latest list

Lists all available components from the registry.

Registry

The default registry URL is written to components.json during init. If the public registry is not live yet, pass --registry <url> explicitly:

npx frakment@latest add badge --registry http://localhost:8765

Troubleshooting

"Frakment requires Tailwind v4"

Your globals.css must contain @import "tailwindcss";. Frakment relies on Tailwind v4 features (@theme, @utility, @custom-variant). Tailwind v3 is not supported.

"Could not find globals.css"

The CLI looks for one of:

  • app/globals.css
  • src/app/globals.css
  • styles/globals.css
  • src/styles/globals.css

If none exist, create one with at minimum:

@import "tailwindcss";

src/ directory projects

If your globals.css lives at src/app/globals.css, component files are written to src/components/, src/lib/, src/hooks/. Binary assets under public/ are written to public/ at the project root (Next.js serves public/ from the root regardless of src/ layout).

License

MIT licensed. See LICENSE.