installation
the cli is published as @justin06lee/chrome. it needs a react project with tailwind v4; next.js (app router, root or src/layout) is what it's tested against. run everything from the project root with your package manager's runner (bunx, npx, pnpm dlx).
init
bunx @justin06lee/chrome@latest init [--cwd .] [--yes] [--registry <url>]
bootstraps chrome in the project: detects the package manager, framework, and tailwind version, then writes chrome.json (the registry config), lib/utils.ts (the cn helper), and patches globals.css with the fenced theme block. whether the project uses a src/ layout is resolved once here and recorded in chrome.json (aliasBase), so every later command writes to the same place. re-running it is safe — only the fenced block is replaced.
add
bunx @justin06lee/chrome@latest add <name...> [--overwrite] [--yes]
installs one or more components. what you can rely on:
registryDependenciesresolve transitively — addingcommand-palettealso installskbd;deskpulls the whole editor suite. never hand-install a component's dependencies.- npm dependencies are unioned across everything being added and installed in a single pass.
- files land under your configured aliases —
components/chrome/,hooks/,lib/by default, undersrc/whenchrome.json'saliasBasesays so (older configs without the field fall back to tsconfig's@/*mapping). - imports are rewritten to your aliases on install — registry sources reference
@/components/ui/,@/lib/utils, and@/hooks/; the cli rewrites those to thecomponents,utils, andhooksaliases inchrome.json, so cross-component imports resolve whatever your aliases are. - page files install into the app dir: adding
not-founddropsapp/not-found.tsxso the 404 page works with zero wiring. - a local file that differs from the registry copy is a conflict — the cli shows it and exits nonzero instead of overwriting.
--overwriteopts in explicitly.
list
bunx @justin06lee/chrome@latest list
lists every available component, grouped by type.
diff
bunx @justin06lee/chrome@latest diff <name>
unified diff between your local copy and the registry version. the registry content gets the same alias rewrite add applies, so your configured aliases never show up as drift. the installed code is yours to edit — diff is how you audit drift before deciding whether to pull an update with add --overwrite.