For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
FrakmentFrakment

components.json

Configuration file for the Frakment CLI.

The components.json file holds the configuration for the Frakment CLI. npx frakment init writes it to your project root. All fields are optional — the defaults match a standard Next.js + Tailwind v4 setup.

Schema

components.json
{
  "$schema": "https://www.arrafi.dev/frakment/schema.json",
  "registry": "https://www.arrafi.dev/frakment/r",
  "aliases": {
    "components": "@/components",
    "ui": "@/components/ui",
    "utils": "@/lib/utils"
  },
  "tailwind": {
    "css": "app/globals.css"
  }
}

Fields

registry

Base URL the CLI fetches components from. Defaults to https://www.arrafi.dev/frakment/r.

Override per-command with --registry <url>:

$ npx frakment add button --registry http://localhost:3000/r

aliases

Import path prefixes rewritten in the installed component source. When the CLI writes a file, it replaces @/components/ui/, @/components/, and @/lib/utils with the values here. Match them to your tsconfig.json paths entries.

KeyDefaultPurpose
components@/componentsTop-level components directory
ui@/components/uiComponent primitive directory
utils@/lib/utilscn() helper path

aliases controls the import statements inside installed files, not where the files are written. Write targets follow the registry payload paths, with a src/ prefix applied automatically when tailwind.css lives under src/.

tailwind

Tailwind v4 entry point. npx frakment init injects the theme block into this file.

KeyDefaultPurpose
cssapp/globals.cssPath to the CSS file that imports Tailwind

platform

Marks the project as a web or Expo project. init --expo writes "platform": "expo".

ValuePurpose
webDefault. add reads registry and registries.web.
expoadd --expo reads registries.expo.

registries

Optional map of per-platform registry URLs. When present, add --expo reads registries.expo and add reads registries.web, falling back to registry.

json
{
  "registries": {
    "web": "https://www.arrafi.dev/frakment/r",
    "expo": "https://www.arrafi.dev/frakment/r/expo"
  }
}

The --registry <url> flag overrides both maps for that run.

Minimal setup

components.json
{
  "registry": "https://www.arrafi.dev/frakment/r",
  "aliases": {
    "components": "@/components",
    "ui": "@/components/ui",
    "utils": "@/lib/utils"
  },
  "tailwind": {
    "css": "app/globals.css"
  }
}

Troubleshooting

"CSS file not found: app/globals.css"

The path in tailwind.css must exist and contain @import "tailwindcss";. Create the file first:

mkdir -p app && echo '@import "tailwindcss";' > app/globals.css

"Component not found in registry"

The registry URL is unreachable. Check connectivity:

curl <registry>/index.json

A 404 means the URL is wrong. A 000 means the host is unreachable.

Alias mismatch

If installed files import from @/components/ui/button but your project uses ~/ui/button, adjust aliases in components.json and re-run npx frakment add <component> --overwrite:

json
{
  "aliases": {
    "components": "~/components",
    "ui": "~/ui",
    "utils": "~/lib/utils"
  }
}