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

@phroche/p-ds

v0.2.1

Published

CSS-variable-driven design system CLI — add components, themes, and tokens to your project.

Readme

@phroche/p-ds

The CLI for the Phronetic design system. Scaffolds Next.js projects with the DS 1.0 theme pre-wired, then lets you add components and sections from a registry of 1,100+ entries.

Components are copied into your project as source files — you own them. The CLI is only needed when scaffolding or adding new components.


Quick start

# Scaffold a new project (DS 1.0 theme by default)
npx @phroche/p-ds init

# Add components
npx @phroche/p-ds add button card dialog

# Add pre-built marketing sections
npx @phroche/p-ds add --sections hero-1 pricing-3 footer-2

Or install globally for shorter commands:

npm install -g @phroche/p-ds
p-ds init
p-ds add button

What init does

Running p-ds init in an empty directory (or an existing Next.js project):

  1. Creates a Next.js 16 + Tailwind v4 project if one doesn't exist
  2. Installs p-ds-tokens as a project dependency (the DS 1.0 CSS variables)
  3. Writes src/app/globals.css with @import "p-ds-tokens/css" so token variables are available everywhere
  4. Scaffolds src/assets/icons/ with a Lucide provider and 18 brand SVGs
  5. Writes p-ds.config.json at the project root
  6. Installs all required dependencies (@base-ui/react, tailwindcss, class-variance-authority, tailwind-merge, clsx, lucide-react, next-themes)

Themes

DS 1.0 is the default. Pass --theme to choose another:

p-ds init --theme ds1.0      # Phronetic brand (default)
p-ds init --theme phronetic  # Phronetic legacy palette
p-ds init --theme default    # Clean, minimal (zinc)
p-ds init --theme indigo     # Soft, rounded (violet)
p-ds init --theme brutalist  # Bold, hard shadows (hot pink)

Skip all prompts with -y:

npx @phroche/p-ds init --theme ds1.0 -y

Commands

p-ds add

Copies components into src/components/ui/. Resolves transitive dependencies automatically — adding data-table also installs table, button, input, badge, etc.

p-ds add button
p-ds add button card dialog input label field   # multiple at once
p-ds add -y button card                         # skip confirmation
p-ds add --sections hero-1 pricing-3 footer-2  # marketing sections

p-ds list

p-ds list                  # all UI components + install status
p-ds list --sections       # all sections grouped by category
p-ds list --installed      # only installed components

p-ds diff

Shows what changed in the registry since you installed a component.

p-ds diff
p-ds diff button

p-ds update

Pulls upstream changes into installed components.

p-ds update          # all installed components
p-ds update button   # specific component

p-ds transform

Rewrites hardcoded Tailwind color utilities to CSS variable equivalents.

p-ds transform src/components/ui/button.tsx

Configuration

p-ds init creates p-ds.config.json in your project root:

{
  "theme": "ds1.0",
  "aliases": {
    "components": "@/components/ui",
    "utils": "@/lib/utils"
  },
  "css": "src/app/globals.css"
}

| Field | Description | |-------|-------------| | theme | Active theme name | | aliases.components | Where components are written | | aliases.utils | Where cn() utility lives | | css | Path to your global CSS file |


How tokens work

p-ds init installs p-ds-tokens as a dependency of your project and adds this to globals.css:

@import "p-ds-tokens/css";

This makes all DS 1.0 CSS custom properties (--color-primary, --color-background, --button-bg, etc.) available to Tailwind and your components.

When the design system updates token values (colors, spacing, radius), you pick up the changes with:

npm update p-ds-tokens

No need to re-run p-ds add or touch component files. See p-ds-tokens for details.


Component API conventions

  • render prop — polymorphic components use render={<Element />}, not asChild
  • Icons — always import { X } from "@/assets/icons", never from lucide-react directly
  • Brand iconsimport { Github } from "@/assets/icons/brand"
  • cn()import { cn } from "@/lib/utils" for conditional class merging
  • Motionimport { motion } from "motion/react" (not framer-motion)
  • Dark mode — toggled via .dark class on <html>, supported by all components out of the box

Available components (107)

Form: button, input, textarea, label, field, input-group, checkbox, radio-group, switch, select, combobox, multi-select, slider, number-input, rating, tag-input, file-upload, rich-text-editor, color-picker, date-range-picker, time-picker, input-otp

Overlay: dialog, sheet, alert-dialog, drawer, popover, tooltip, hover-card, context-menu, dropdown-menu, menubar, command, tour

Navigation: navigation-menu, breadcrumb, pagination, tabs, sidebar, app-shell

Display: card, badge, alert, avatar, separator, skeleton, progress, spinner, accordion, collapsible, scroll-area, resizable, aspect-ratio, toggle, toggle-group, segmented-control, description-list, empty, watermark

Data: data-table, chart, area-chart, bar-chart, line-chart, donut-chart, spark-chart, bar-list, tracker, stat-card, calendar

Media: carousel, image-zoom, video-player, video-grid, video-tile, audio-visualizer, qr-code

Communication: chat, chat-input, chat-message, message-bubble, notification-center, typing-indicator, sonner

Misc: kanban-board, transfer-list, tree-view, stepper, timeline, code-block, kbd, inline-cta, suggestion-chips


Sections

Sections are named {category}-{number} (e.g. hero-1, pricing-3). Use p-ds list --sections to see all 978.

p-ds add --sections hero-1 feature-5 pricing-2 footer-1

Import and render them directly:

import Hero1 from "@/components/sections/hero/hero-1"
import Pricing2 from "@/components/sections/pricing/pricing-2"

export default function Page() {
  return (
    <>
      <Hero1 />
      <Pricing2 />
    </>
  )
}

Updating the CLI / publishing

cd packages/novacn
npm run build        # rebuilds registry (1,146 entries) + CLI bundle
npm version patch
npm publish --access public