Documentation / Installation and CLI
Installation and CLI
Commands, package managers, editions, and safe updates.
Command reference
Run commands from your app folder. PRESET means a local JSON file or an exact published preset code; RECIPE means a local recipe JSON file or exact recipe code. Replace these placeholders before running a command.
npx @ombelle-ui/cli@1.1.2 init --preset PRESET
npx @ombelle-ui/cli@1.1.2 add button dialog input
npx @ombelle-ui/cli@1.1.2 theme add PRESET
npx @ombelle-ui/cli@1.1.2 add --recipe RECIPE
npx @ombelle-ui/cli@1.1.2 add button --preset PRESETinit sets up project defaults. add installs named components. theme add applies project tokens and style rules. add --recipe installs a separate scoped component. add button --preset installs a separate preset-scoped Button; this last form supports one Button at a time.
Choose a runner and target folder
pnpm dlx @ombelle-ui/cli@1.1.2 init --preset ./project-preset.jsonThe runner downloads the installer; it does not change your app’s package manager. Yarn runner tabs use modern Yarn; Yarn Classic has no dlx. Use npx to run the installer for a Yarn Classic app. Modern Yarn may delay newly published versions according to its configured minimum release age.
When invoking from another directory, use --cwd ./path-to-app. Local JSON paths resolve from the invoking directory, independently of --cwd. Quote paths containing spaces. Use --package-manager npm|pnpm|yarn|bun only when project detection needs an explicit choice.
Add Ombelle to an existing shadcn project
- Download a preset JSON into the app folder.
- Run the theme command below with
--dry-runand inspect the changes. - Run it again without
--dry-runand accept the plan. - Add the components you want. Resolve any existing source conflicts before applying.
pnpm dlx @ombelle-ui/cli@1.1.2 theme add ./project-preset.json --dry-runThe theme command merges shared palette and tokens and saves the project preset. Existing components that read those variables can change appearance. It preserves existing component source; it does not rewrite that markup into a different component API.
The installer detects Radix or Base UI from the style in components.json. Supported styles are radix-nova, new-york and the eight base-* styles (base-nova, base-vega, base-maia, base-lyra, base-mira, base-luma, base-sera and base-rhea). With any other style, such as radix-vega, or shadcn’s React Aria base, theme add merges the palette and tokens only and add is refused. All 63 ordinary components support both editions. Base UI uses render for composition where Radix uses asChild. Recipes and preset-scoped Buttons currently require Radix. Once components are installed, switching the recorded edition requires an explicit migration.
Keep an existing component or replace it
If button.tsx already belongs to your app, the installer stops rather than silently replacing it. For an eligible source conflict, --beside preserves the original and installs Ombelle under the configured components directory’s ombelle/ folder.
pnpm dlx @ombelle-ui/cli@1.1.2 add button --beside components/ui/button.tsxWith the default alias, import that separate Button from @/components/ui/ombelle/button. --overwrite components/ui/button.tsx explicitly replaces an eligible existing file. Use the exact conflicting path reported by the CLI. These resolutions do not bypass changes to an already Ombelle-owned file.
Plan changes and update safely
--dry-runcomputes and prints a plan without writes.--jsonreturns structured output; keep--quieton the Yarn runner to avoid mixing runner output with JSON.--yesaccepts a safe plan. It cannot bypass schema errors, incompatible projects, or modified-file conflicts.- Dependency installation disables lifecycle scripts. The apply transaction checks for stale inputs and supports recovery if applying fails.
When a command reports that managed shared style rules have changed, run theme add with the exact preset path it prints, review the plan, then retry the component addition. If you edited the managed file, reconcile it manually first. There is no general automatic source migration command.