- Accordion
- Attachment
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Card
- Checkbox
- Code Block
- Collapsible
- Dialog
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Label
- Marker
- Message
- Number Flow
- Pagination
- Popover
- Progress
- Radio Group
- Select
- Slider
- Sonner
- Spinner
- Switch
- Tooltip
- Separator
- Sheet
- Tabs
- Textarea
- Toggle
- Toggle Group
- Trace
CLI Reference
All Frakment commands, flags, and registry format.
Complete reference for the frakment CLI. New to Frakment? Start with Installation first — this page assumes the project is already bootstrapped.
Commands
| Command | Description |
|---|---|
frakment init | Bootstrap the project: write components.json, inject the theme block into globals.css, create lib/utils.ts, install base dependencies. Pass --expo for an Expo + NativeWind project. |
frakment add <name…> | Fetch one or more components (plus registryDependencies recursively), write files, install missing npm deps. Pass --expo to fetch from the Expo registry. |
frakment list | List all components exposed by the configured registry. |
Flags
frakment init
| Prop | Type | Default | Description |
|---|---|---|---|
--expo | boolean | — | Bootstrap an Expo + NativeWind project. Writes components.json with platform set to expo and registries.expo, copies lib/utils.ts and lib/theme.ts, and installs base dependencies with npx expo install. |
frakment add
| Prop | Type | Default | Description |
|---|---|---|---|
--dry-run | boolean | — | Show planned files and dependencies without changing the project. |
--registry <url> | string | — | Override the registry URL for this run. |
--expo | boolean | — | Fetch from registries.expo and install dependencies with npx expo install. |
--skip-dependencies | boolean | — | Write component files without installing missing npm dependencies. |
--overwrite | boolean | — | Overwrite existing files without prompting. |
Pass several names in one call — dependencies are deduplicated across the
batch. Example: npx frakment@latest add button card badge.
frakment list
No flags. Reads registry from components.json and prints every available component name with a one-line description.
Registry resolution
During init, the CLI writes a registry field to components.json. add and list read from it by default.
registries.expo
init --expo writes a registries map that keeps web and Expo URLs side by side:
{
"registries": {
"web": "https://www.arrafi.dev/frakment/r",
"expo": "https://www.arrafi.dev/frakment/r/expo"
}
}add --expo reads registries.expo. add without the flag reads registries.web, falling back to registry. The --registry <url> flag overrides both.
Registry entry format
Each component lives at <registry-url>/r/<name>.json:
{
"name": "button",
"dependencies": ["class-variance-authority", "radix-ui"],
"registryDependencies": [],
"files": [{ "path": "components/ui/button.tsx", "content": "..." }]
}registryDependencies are resolved recursively before any files are written. Install order: deepest dependency first.
Idempotency
init is safe to re-run. Existing components.json is preserved unless overwritten. The theme marker block (/* ==== FRAKMENT THEME START/END ==== */) is replaced in place — no duplicates. Legacy inline theme blocks are auto-migrated.
Troubleshooting
Specific errors (Tailwind v4 requirement, missing globals.css, src/ layout) are documented in Installation → Troubleshooting.
License
MIT licensed. Free for personal, educational, and commercial use.