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

@zxkit/forge

v1.1.0

Published

CLI for adding shadcn components to Turborepo monorepos

Downloads

6

Readme


Features

  • 🏗️ Monorepo-first - Designed specifically for Turborepo monorepos
  • 📦 Automatic setup - Creates and configures packages/ui structure
  • Always up-to-date - Uses official shadcn CLI under the hood
  • 📝 Auto exports - Automatically updates index.ts barrel exports
  • 🔗 Dependency resolution - Installs component dependencies in the right place
  • 🎨 Import transformation - Transforms imports to use your package scope
  • Fast - Uses your existing package manager (bun, pnpm, npm, yarn)

Installation

# Run directly with bunx (recommended)
bunx --bun @zxkit/forge@latest init

# Or install globally
npm install -g @zxkit/forge

Prerequisites

Before using forge, make sure you have:

  1. A Turborepo monorepo (with turbo.json in root)
  2. shadcn/ui initialized - Run bunx --bun shadcn@latest init first

Usage

Initialize

Set up the UI package structure in your monorepo:

bunx --bun @zxkit/forge@latest init

This will:

  • Detect your project name and create @<name>/ui package
  • Configure packages/ui with proper exports
  • Update components.json with correct aliases
  • Update imports in your apps to use the barrel export

Add Components

Add components using the official shadcn CLI:

# Add a single component
bunx --bun @zxkit/forge@latest add button

# Add multiple components
bunx --bun @zxkit/forge@latest add button dialog card

# Overwrite existing components
bunx --bun @zxkit/forge@latest add button --overwrite

How it works:

  1. Runs bunx --bun shadcn@latest add <component> in packages/ui
  2. Captures and processes the files created by shadcn
  3. Transforms imports from @/ to your package scope (@your-scope/ui)
  4. Updates barrel exports in index.ts

This ensures you always get the latest component versions directly from shadcn!

Components are installed to packages/ui/src/components/ with:

  • Dependencies installed in packages/ui
  • Imports transformed to use your package scope
  • Barrel exports automatically updated

Project Structure

After initialization, your monorepo will have:

your-monorepo/
├── apps/
│   └── web/
│       └── ... (imports from @your-scope/ui)
├── packages/
│   └── ui/
│       ├── src/
│       │   ├── components/
│       │   │   ├── button.tsx
│       │   │   └── ...
│       │   ├── hooks/
│       │   ├── lib/
│       │   │   └── utils.ts
│       │   ├── styles/
│       │   │   └── globals.css
│       │   └── index.ts (barrel exports)
│       ├── components.json
│       ├── package.json
│       └── tsconfig.json
├── turbo.json
└── package.json

Importing Components

After setup, import components in your apps:

// Simple barrel import
import { Button, Card, Dialog } from '@your-scope/ui'

// Or specific imports (also works)
import { Button } from '@your-scope/ui/components/button'

Commands

forge init

Initialize/configure the UI package structure.

forge init

What it does:

  • Detects Turborepo monorepo
  • Reads project name from root package.json
  • Creates/configures packages/ui
  • Updates components.json aliases
  • Updates app imports to use barrel exports

forge add [components...]

Add components from the shadcn registry.

forge add <component> [component...] [options]

Options:

  • -o, --overwrite - Overwrite existing files
  • -y, --yes - Skip confirmation prompts

Examples:

forge add button
forge add button card dialog
forge add button --overwrite

Configuration

Forge reads configuration from components.json in packages/ui:

{
  "$schema": "https://ui.shadcn.com/schema.json",
  "style": "new-york",
  "tailwind": {
    "css": "src/styles/globals.css",
    "baseColor": "neutral",
    "cssVariables": true
  },
  "aliases": {
    "components": "@your-scope/ui/components",
    "utils": "@your-scope/ui/lib/utils",
    "hooks": "@your-scope/ui/hooks",
    "lib": "@your-scope/ui/lib"
  }
}

Supported Package Managers

Forge automatically detects and uses your package manager:

  • bun (recommended)
  • pnpm
  • yarn
  • npm

Requirements

  • Node.js >= 20
  • Turborepo monorepo
  • shadcn/ui initialized (bunx --bun shadcn@latest init)

License

MIT © nxtvoid