Search documentation

Search pages, components, blocks, styles and colours.

Get started
Skip to content

CLI

PreviousNext

Use the fabricator-ui CLI to create projects, add components and check your setup.

Use the fabricator-ui CLI to create projects, add components to them and check that they are set up correctly. It is built on the shadcn CLI, so the @fabricator registry also works with that CLI directly. See Registry.

bunx --bun fabricator-ui@latest --help

create

Use the create command to start a project or a monorepo. One command does the whole job: it creates the app, installs your look and components, wires the App Shell and sounds into your root layout, and sets up your AI assistants. The setup page writes this command for you.

bunx --bun fabricator-ui@latest create my-app

On a terminal it asks for what your flags leave open. With --yes, or in CI, it uses the defaults instead: Next.js, Base UI, the App Shell and interface sounds.

It starts a monorepo unless you say otherwise: a web app in apps/web and its components in packages/ui. --mobile adds a React Native app with Expo, and --desktop adds an Electron or Tauri window around the web app. --no-monorepo makes one app in one folder instead.

bunx --bun fabricator-ui@latest create my-app --mobile --desktop tauri --agents claude,codex --yes

Every app gets your look. The web app and the desktop window share a codebase, and the mobile app has its own React Native components, written from the same App Shell options.

No website? --no-web leaves it out. A mobile app on its own still gets the monorepo, with the app in apps/mobile and no web packages; for a plain Expo project, use -t expo. A desktop app on its own keeps apps/web, because its window renders that app.

bunx --bun fabricator-ui@latest create my-app --mobile --no-web --yes
npx fabricator-ui@latest create my-app --desktop electron --no-web --yes

Tooling. A monorepo lints and formats with ESLint and Prettier, as the framework templates do; React Router and the mobile app get the ESLint config their templates leave out. --tooling biome or --tooling vite-plus replaces both with one tool, configured once at the root (biome.json or vite.config.ts), with lint, format and check scripts there.

Turborepo runs the monorepo's tasks, as in the templates. --runner vite-plus runs them with vp run instead, and drops turbo.json. A lone mobile app has no tasks to run across packages, so it gets neither.

bunx --bun fabricator-ui@latest create my-app --tooling vite-plus --runner vite-plus --yes

Options

Usage: fabricator-ui create [options] [name]
 
Options:
  -t, --template <framework>  next, vite, start, react-router, astro, laravel, expo
  -b, --base <base>           component library: base, radix or aria
  --monorepo                  a monorepo, with room for more apps (the default)
  --no-monorepo               a single project: one app in one folder
  --no-web                    no website: a mobile app alone stays in apps/mobile
  --mobile                    add apps/mobile: React Native with Expo
  --desktop <runtime>         add apps/desktop: electron or tauri
  --tooling <toolchain>       linting and formatting: eslint-prettier, biome, vite-plus
  --runner <runner>           what runs the monorepo's tasks: turborepo, vite-plus
  --look <values>             your look, as key=value pairs: primary=260_0.2,shape=pill
  --shell [options]           the App Shell, with key=value options
  --no-shell                  skip the App Shell
  --icons <library>           an icon library other than Fabricator's
  --spinner <variant>         default loading animation (see Spinner for all twenty-two variants)
  --no-sounds                 skip the interface sounds
  --all                       add every component
  --agents <assistants>       claude, cursor, vscode, codex, opencode
  --no-skill                  don't install the agent skill and DESIGN.md for --agents
  --no-mcp                    don't configure the MCP server for --agents
  -y, --yes                   use the defaults for anything not given
  --dry-run                   print the plan and write nothing
  --json                      machine-readable output, for agents

If a step fails, the CLI prints the end of its log. Run the same command again and it picks up where it stopped.


init

Use the init command to set up Fabricator UI in an existing project. It changes only what its flags name:

bunx --bun fabricator-ui@latest init --shell --sounds --agents claude,codex --yes
  • --shell writes the App Shell and adds it to your root layout, when it recognises the file. When it doesn't, it leaves the file alone and tells you what to add.
  • --spinner <variant> installs Spinner and saves the default pattern for your project. orbit is the default. All twenty-two patterns on the Spinner page work with this flag.
  • --look applies a look, which reinstalls your components. In a project with uncommitted work it stops, unless you pass --force.
  • In a monorepo, run it at the root: it sets up each app, with the React Native components in an Expo app.

With no flags, init asks what you want to do:

  • Add registry only: adds @fabricator to the registries in your components.json. Your theme and existing components are left untouched.
  • Apply theme: adds the registry and applies a Fabricator preset to your theme and fonts.

add

Use the add command to add components and their dependencies to your project.

bunx --bun fabricator-ui@latest add button

At a monorepo's root, it finds your apps: one is used, and several ask. --app web,mobile or --app all chooses without asking, and each app gets its own version of the component.

Bare names resolve to the @fabricator registry, so add button installs @fabricator/button. Namespaced names are passed through as they are:

bunx --bun fabricator-ui@latest add button card @acme/auth

add also accepts --overwrite, --all, --path, --dry-run, --diff and --view.


apps

Use the apps add command to add an app to a monorepo later, with the same steps create uses.

bunx --bun fabricator-ui@latest apps add mobile
npx fabricator-ui@latest apps add desktop tauri

agents

Use the agents add command to set up AI assistants: the agent skill and the MCP server. Pass as many as you use.

bunx --bun fabricator-ui@latest agents add claude codex

upgrade

Use the upgrade command to reinstall your Fabricator components at their latest versions. Your edits show up as a git diff, so it stops on uncommitted work unless you pass --force.

bunx --bun fabricator-ui@latest upgrade
npx fabricator-ui@latest upgrade button dialog --dry-run

apply

Use the apply command to apply a preset to an existing project.

bunx --bun fabricator-ui@latest apply [preset]

To apply only the theme or the fonts from a preset, without reinstalling UI components, use --only:

bunx --bun fabricator-ui@latest apply [preset] --only theme,font

Supported values for --only are theme and font.


Use the search command to search the @fabricator registry. list is an alias.

bunx --bun fabricator-ui@latest search [query]
bunx --bun fabricator-ui@latest list date

view

Use the view command to inspect items from the registry before installing them.

bunx --bun fabricator-ui@latest view button

docs

Use the docs command to fetch documentation and API references for a component.

bunx --bun fabricator-ui@latest docs button

diff

Use the diff command to compare a component in your project with the latest version in the registry.

bunx --bun fabricator-ui@latest diff button

info

Use the info command to print information about your project: framework, Tailwind and React versions, components.json and installed components.

bunx --bun fabricator-ui@latest info

doctor

Use the doctor command to check that your project is set up for Fabricator UI.

bunx --bun fabricator-ui@latest doctor

It checks that:

  • the project uses Tailwind CSS v4 and React 19.
  • components.json is valid and its style is a valid style id.
  • the @fabricator registry is configured.
  • shadcn/tailwind.css is imported.

For every failed check, it prints the fix.


mcp

Use the mcp command to run the Fabricator MCP server. It gives your AI assistant access to the @fabricator registry.

bunx --bun fabricator-ui@latest mcp

To write the MCP configuration for your editor or agent, use mcp init:

bunx --bun fabricator-ui@latest mcp init --client claude,codex

Pass one client or several. Supported clients are claude, cursor, vscode, codex and opencode. See MCP Server.