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

empiric-reactui

v0.6.0

Published

CLI for copying editable React UI components into your project.

Readme

empiric-reactui

npm version License

Add editable React UI components to your project with a command-line tool. The CLI copies the component source into your app, so you own the files and can change them. It installs the packages the selected components need; your app does not depend on this CLI at runtime.

npx empiric-reactui@latest init
npx empiric-reactui@latest add button

Requirements

  • Node.js 18 or newer.
  • An existing React app with react and react-dom in its package.json.
  • Tailwind CSS v4. The init command sets up the React UI theme and offers to install missing Tailwind dependencies.

Run CLI commands from your app's root directory, where its package.json is located. You do not need to install the CLI globally.

Getting started

1. Set up the project

npx empiric-reactui@latest init

The command creates a components.json configuration and the shared cn utility. It also sets up the React UI theme, installs missing theme packages, and wires the @/* import alias when it can. If it cannot update your Vite configuration automatically, it prints the steps to finish setup.

If your app already has an entry CSS file with content, init asks before replacing it with the theme import. Review that prompt before approving the change.

2. Add components

npx empiric-reactui@latest add button

Add several components in one command:

npx empiric-reactui@latest add button card dialog

The CLI copies the component files into your app, resolves and adds required components, and offers to install any missing npm packages. Some components also offer an optional example page.

To browse the available component names interactively, run add without names in a terminal. To print the names, run:

npx empiric-reactui@latest add --help

You can run add without init; it creates a default configuration and the shared utility when needed. Running init first is recommended to set up the theme.

Commands

| Command | What it does | | --- | --- | | npx empiric-reactui@latest init | Set up the theme, configuration, and shared utility. | | npx empiric-reactui@latest add <name...> | Copy one or more components into the app. | | npx empiric-reactui@latest add | Choose components interactively. | | npx empiric-reactui@latest redux-toolkit | Scaffold a Redux Toolkit store, typed hooks, example slices, and API client. | | npx empiric-reactui@latest completion bash | Print Bash completion setup. | | npx empiric-reactui@latest completion zsh | Print Zsh completion setup. |

redux-toolkit also accepts the shorter alias redux. It can be run without init. It creates the Redux files and tries to wrap your app in a Redux <Provider>. If it cannot safely recognize your entry file, it prints the wiring instructions instead.

Prompts and existing files

The CLI detects npm, pnpm, or Yarn from your app's lockfile and uses that package manager to install dependencies. It asks before installing packages and before including optional example pages.

If a target file already exists and differs from the component version, the CLI shows the conflict and asks before replacing it. Identical files are left unchanged.

  • --overwrite replaces files that differ from the registry version.
  • -y or --yes automatically approves package installs, optional pages, and file overwrites.

For example:

npx empiric-reactui@latest add button --overwrite
npx empiric-reactui@latest add button card --yes

Use --yes in scripts or other non-interactive environments. It approves overwriting changed files, so use it only when that is what you intend.

Updating copied components

The component files in your app are yours to edit. To replace a changed local file with the current registry version, run add again and use --overwrite when prompted. Review your local changes first; overwriting replaces the file contents.

Help

npx empiric-reactui@latest --help
npx empiric-reactui@latest add --help
npx empiric-reactui@latest redux-toolkit --help

Troubleshooting

  • The CLI cannot find package.json: run it from your React app's root directory.
  • The folder is not recognized as a React app: check that react and react-dom are listed in that app's package.json.
  • A component name is unknown: run npx empiric-reactui@latest add --help to see the names in the version you are using.
  • A package install is declined: rerun the command and approve the install prompt, or use --yes if you intend to approve all prompts.

License

This package is released under the MIT license.