get-ui

Live on npm · Oct 2026 – ongoing

At a glance

components indexed
0
components indexed
of free ones verified to install cleanly
0%
of free ones verified to install cleanly
open-source registries
0
open-source registries

Open with

Get it on npm

On repeat

On Melancholy Hill

Gorillaz

0:00--:--

Chat about get-ui

Yash ›

psst, I answer from my notes on get-ui, so ask me about the hard bits.

Today

get-ui

One terminal command to install any of 2,800+ React and Tailwind components from nine open-source registries, without breaking the project you drop them into.

  • TypeScript
  • Node.js
  • Next.js
  • Sucrase
Get it on npm

2,855

components indexed

97.7%

of free ones verified to install cleanly

9

open-source registries

“
I wanted one command that pulls any component from any registry and wires it in without breaking my project.
why I built it

01How it flows

  1. 1Find and preview a componentlive, in the browser
  2. 2Inspect your projectaliases, Tailwind v3/v4, package manager
  3. 3Resolve the whole treeacross libraries
  4. 4Merge and rewriteimports, CSS vars, keyframes

02The fun part3 problems

Radix vs Base UI

1/3

Two libraries both want a button.tsx built on different primitives. A clash detector compares flavour, similarity and API, then installs the newcomer alongside yours instead of over it.

src/node/install.ts

Registries that forget their dependencies

2/3

Manifests skip internal imports. A three-pass resolver scans the code and pulls missing helpers straight from the upstream repo.

src/core/resolve.ts

Previews with no backend

3/3

Each preview compiles TSX in the browser with Sucrase, loads packages from esm.sh and runs Tailwind v4 inside an iframe.

web/src/lib/preview/build.ts
src/node/install.tsts
1export function clashes(existing: string, incoming: string): boolean {
2 const a = flavour(existing);
3 const b = flavour(incoming);
4 if (a && b && a !== b) return true;
5 if (similarity(existing, incoming) < DIFFERENT_COMPONENT) return true;
6 const have = api(existing);
7 for (const x of api(incoming)) if (!have.has(x)) return true;
8 return false;
9}

03What broke

  • I tried indexing Uiverse's raw HTML snippets. Installs were fragile, so I ripped it out.
  • Three.js canvases and server actions can't run in the browser sandbox yet.
  • The registry crawler still runs by hand; it should be a weekly GitHub Action.

The leftovers

Still going. I started it in October 2026.

The funny part is that I'm the user this was built for. I'd open a component site to grab one thing, forget what I came for, and an hour later I'd still be scrolling.

04Things people ask

What is the tech stack?

The CLI is built with TypeScript, Node.js, Commander, and @clack/prompts. The web app is built with Next.js 16, React 19, and Tailwind CSS v4, utilizing Sucrase and @tailwindcss/browser for in-browser client sandboxing.

How does this differ from running `npx shadcn add`?

shadcn add only works with official shadcn registries and assumes components share the same design system and dependencies. get-ui is a universal aggregator across nine libraries that resolves cross-library dependencies, handles Base UI vs Radix collisions, non-destructively merges global CSS variables, and rewrites path aliases to fit your project.

Why don't you store component code in a database?

Several libraries (like Aceternity UI) explicitly forbid redistributing their code in third-party packages or databases. By indexing only metadata and source URLs, get-ui fetches code straight from upstream vendors at install or preview time, keeping it legal, compliant, and always up to date.

How do you prevent collisions between Radix UI and Base UI components?

The CLI checks the implementation flavour, word similarity, and exported API of existing files. If you already have a Radix-based button.tsx and install a Base UI component, get-ui installs the new file into a subfolder (components/ui/base-ui/button.tsx) and updates the component's imports so your existing button never gets clobbered.

Does it work with both Tailwind v3 and Tailwind v4?

Yes. The project introspector detects your Tailwind version. For Tailwind v4, it merges theme variables directly into your CSS @theme or root rules; for Tailwind v3 projects, it maps keyframes and variables into the appropriate configuration blocks.

How do the web previews work without a backend compiler?

The web app fetches the component code through a caching proxy, transpiles the TSX in the browser using Sucrase, pulls npm packages from esm.sh pinned to React 19, and runs @tailwindcss/browser v4 inside an isolated iframe.

What happens if my project doesn't have `lib/utils.ts` or `cn`?

If the CLI detects that you don't have a cn helper, it automatically generates lib/utils.ts using clsx and tailwind-merge and adds those packages to your dependencies.

What happens if I already have `motion` instead of `framer-motion`?

The CLI inspects your package.json. If you already use motion, it automatically rewrites incoming from 'framer-motion' imports to from 'motion/react' instead of installing redundant packages.

Can I install paid or Pro components?

Yes, provided you have a license from the library author. You supply your license key as an environment variable (such as GET_UI_TOKEN_ACETERNITY or REUI_LICENSE_KEY), and get-ui passes the authentication header to the vendor registry during fetch.

What was the hardest bug to track down?

Handling undeclared dependencies in third-party registries where components imported sibling files or relative math utilities that weren't declared in the registry JSON. I had to build a multi-pass scanner that inspects AST import strings and falls back to pulling missing helper files straight from raw GitHub repositories.

The whole write-up5 min read, for the curious

The itch

Frontend moved from monolithic npm packages to copy-paste component registries like shadcn, Aceternity, and Magic UI, but developer experience went backwards. Every time I needed an animated button or bento grid, I had to hop between docs sites, track down missing npm packages, fix broken path aliases, and manually paste CSS variables. I wanted a single CLI command that could pull any component from any registry, resolve its entire dependency tree, and wire it into my project without breaking my existing setup.

What it does

You find a component on get-ui.dev or through terminal search, run npx get-ui-cli add <name>, and it installs into your codebase ready to use:

  1. Find & Preview: Search 2,855 components (2,023 free, 832 Pro) from nine libraries. On the web, you interact with real live previews and compare alternatives side by side.
  2. Inspect: The CLI checks your project layout—reading tsconfig.json paths, Tailwind version (v3 vs v4), global stylesheet, and package manager.
  3. Resolve Tree: It recursively fetches every sub-component the item needs, even across libraries (like a Kokonut UI prompt needing shadcn buttons and dropdowns).
  4. Merge & Rewrite: It rewrites imports to match your aliases, merges missing CSS variables and @keyframes without overwriting existing rules, and installs only missing npm packages.

How it works

The project is a monorepo with three parts:

  • The Registry (registry/index.json): Built by scripts/build-registry.ts. Indexes 2,855 items across 9 libraries. Stores zero component code—only metadata, categories, dependencies, and vendor source URLs.
  • The Core Engine (src/core/): Pure TypeScript with zero Node APIs, shared between CLI and web. Handles fuzzy search, recursive resolution, import rewriting, and CSS AST merging.
  • The Node Runner (src/node/): Handles filesystem operations, detects project configurations (tsconfig.json, components.json, package managers), checks for file collisions, and writes planned files.
  • The Web Explorer (web/): Next.js 16 app deployed on Vercel with client-side live previews, comparison boards, and interactive install demos.

The fun part

Making components from nine independent libraries coexist in any arbitrary project came down to three technical hurdles.

1. The Radix vs Base UI Primitive Clash

When installing a ReUI component into an existing shadcn project, both need a button.tsx. But ReUI builds on @base-ui/react, while shadcn builds on Radix UI (@radix-ui/react-slot). If you overwrite the existing button, your entire app breaks. If you skip installing it, the incoming component crashes due to missing props.

I solved this by building a structural clash detector in src/node/install.ts. When an existing file matches the target path, it checks:

  • Primitive flavour (Radix vs Base UI).
  • Word-token similarity (different components with the same name score 0.3–0.4; user edits to the same file score >0.55).
  • Exported API surface (component names, destructured props, and cva variant keys).
export function clashes(existing: string, incoming: string): boolean {
  const a = flavour(existing);
  const b = flavour(incoming);
  if (a && b && a !== b) return true;
  if (similarity(existing, incoming) < DIFFERENT_COMPONENT) return true;
  const have = api(existing);
  for (const x of api(incoming)) if (!have.has(x)) return true;
  return false;
}

If it detects a clash, get-ui installs the incoming version into a segregated directory (like components/ui/base-ui/button.tsx) and updates the incoming component's imports to point there, leaving the user's primary button untouched.

2. Multi-Pass Resolution for Incomplete Registries

Upstream registries often omit internal dependencies in their JSON manifests. A component might import @/components/ui/button or a local math helper without declaring it in registryDependencies. Amicro did not bundle local utility files inside its registry payloads at all.

I built a three-pass BFS resolution pipeline in src/core/resolve.ts:

  1. Pass 1: Concurrently fetch all declared registryDependencies.
  2. Pass 2: Scan file contents for undeclared sibling imports (@/components/ui/... or @/registry/...) and pull those down.
  3. Pass 3: If a file imports a local helper missing from the registry (fetchUnshippedLocals), fetch it directly from the raw upstream GitHub repository.

3. Zero-Backend Client Sandboxing

Running server-side containers for thousands of components is slow and costly. Previews on get-ui.dev run entirely in the browser.

In web/src/lib/preview/build.ts, an isolated <iframe> compiles component TSX on the fly using Sucrase, maps npm packages to esm.sh bundles pinned to React 19, and runs @tailwindcss/browser v4 directly in the iframe to generate atomic utility classes in memory. Pre-rendered WebP snapshots display instantly while the live sandboxes boot in the background.

What broke / what I'd change

  • The Uiverse dead end: Early on, I tried indexing Uiverse components alongside shadcn libraries. Uiverse was raw HTML/CSS snippets without standardized props or Tailwind conventions. Normalizing raw HTML into React components bloated the codebase and produced fragile installs. I ripped it out in commit 6b68130 and locked get-ui to shadcn-format registries.
  • Canvas and 3D limitations: While Sucrase + Tailwind v4 runtime handles 95% of components, heavy 3D canvases (Three.js/Fiber) or Next.js server actions cannot run in a static browser sandbox. Currently, those fall back to documentation links.
  • Manual scraper trigger: The registry crawler (scripts/build-registry.ts) runs as a local script. I want to move this to a scheduled GitHub Action that runs weekly, checks upstream registry diffs, and opens automated PRs when libraries add components.

Numbers

  • 2,855 components indexed across 9 libraries (2,023 free, 832 Pro).
  • 1,975 of 2,022 free components (97.7%) verified working end-to-end via an automated verification harness (scripts/verify-installs.ts).
  • Each component was tested with real CLI installs into a clean Next.js 16 + React 19 + Tailwind v4 + TypeScript 5 template, verified for zero missing packages, passed strict TypeScript checks, and compiled CSS with Tailwind v4.
  • All 47 failures were upstream React 19 ref type incompatibilities (e.g., RefObject<null> vs RefObject<HTMLDivElement>) in the vendor code.

Leftovers

Still going. I started it in October 2026.

The funny part is that I'm the user this was built for. I'd open a component site to grab one thing, forget what I came for, and an hour later I'd still be scrolling.