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

@napled/cli

v0.6.0

Published

CLI Tool for Napled components

Readme

Napled CLI

JSR Version npm Version License: Apache-2.0

A smart command-line tool for scaffolding components and themes directly into your project. napled reads your shadcn/ui configuration, resolves dependencies, and installs everything you need with a single command.

Inspired by the shadcn/ui CLI, napled is designed to accelerate your development by providing a seamless bridge between your component library and your application.


Features

  • shadcn/ui Aware: Automatically detects your project's paths from components.json and tsconfig.json.
  • Smart Dependency Resolution: When you add a component, napled automatically installs its dependencies from both the source library and shadcn/ui.
  • Component Discovery: List all available components and themes directly from your terminal with napled list.
  • Custom Repositories: Point the CLI to any GitHub, GitLab, or Gitea/Forgejo repository to use your own component libraries.
  • Version Pinning: Fetch components from a specific branch or tag for version consistency.
  • Theme Management: Easily add and manage themes by appending styles to your global CSS file.

Getting Started

Using napled is a simple three-step process.

Prerequisites

Your project must be set up with shadcn/ui. If you haven't done so, please run its initialization command first:

npx shadcn@latest init

1. Verify Your Configuration

Run the napled init command to customize the package manager and ensure your project is correctly configured and ready to use napled.

npx @napled/cli@latest init

If successful, you will see a confirmation message. This command doesn't create any files; it only validates your existing shadcn/ui setup.

2. List Available Components

To see what components are available to install, use the list command.

npx @napled/cli@latest list

This will fetch the component registry and display a clean list of all available component names.

3. Add a Component

Use the add command to add a component to your project. napled will handle the rest, including installing all necessary dependencies.

npx @napled/cli@latest add Header

Adds a component to your project. napled automatically handles all dependencies

  1. Internal Dependencies: Installs other components from the source library that are required.
  2. shadcn/ui Dependencies: Installs required base components from the official shadcn/ui registry.
  3. npm Dependencies: Installs any required third-party npm packages (e.g. framer-motion) using the package manager you configured during init.

Command Reference

napled init

Verifies that the project is configured for shadcn/ui by checking for a valid components.json file and lets you customize the default package manager.

napled list

Fetches and lists all available components from the configured repository's registry.

napled add <component-name>

Adds a component and its dependencies to your project.

  • <component-name>: The name of the component to add (e.g. "Faq", "Header"). Use napled list to find available components.

napled theme <theme-name>

Fetches a theme's CSS variables and appends them to the global CSS file defined in your components.json.

  • <theme-name>: The name of the theme to apply (e.g. "shark", "zillowe").

napled set repo <repo-url>

Configures the CLI to use a custom repository for components and themes. This creates a napled.json file in your project's root.

Options:

  • --branch <name>: Specify a branch or tag to use (e.g. "next", "v1.2.0"). Defaults to main.
  • --github, --gitlab, --gitea, --forgejo: Manually specify the platform if auto-detection fails (e.g. for self-hosted instances).

Examples:

  • GitHub (auto-detected):
    napled set repo https://github.com/your-org/my-design-system
  • GitLab with a specific branch:
    napled set repo https://gitlab.com/your-org/my-design-system --branch next
  • Self-Hosted Gitea Instance:
    napled set repo https://git.mycompany.com/design/components --gitea

How It Works (Architecture)

napled intelligently connects to a source repository that contains a component registry.

  • components/registry.json: This manifest file in the source repository defines each component, its source files, its internal dependencies (other components in the repo), and its external shadcn/ui dependencies.
  • napled.json: A local configuration file created by set repo that allows you to override the default source repository.
  • components.json & tsconfig.json: Your project's existing shadcn/ui and TypeScript configuration files are used to determine where to place files.

For detailed information on the internal modules and functions, please see the TSDoc comments in the source code, which are rendered on the JSR package page.

Contributing

Contributions are welcome! If you'd like to help improve napled, please feel free to open an issue or submit a pull request on our GitLab repository.

License

Licensed under the Apache 2.0 License.