Introduction
Build your own Shadcn CLI.
Fuma CLI is a toolkit for building your own shadcn/ui-style CLI.
- The compiler turns your source files into a registry: a manifest plus the raw files.
- The installer links files against the consumer's codebase and writes them.
Why Fuma CLI
Fuma CLI addresses a few problems when maintaining larger registries:
- No edge to maintain: the compiler reads the imports of each file. Referenced files are installed along, referenced packages become dependencies.
- Configured like a bundler: components are the entries, and glob rules decide where files are installed. There is no list of files to keep in sync.
- Works with published packages: when a file imports something your package already exports, the installed code imports it from the package. The compiler verifies every name it rewrites.
- Monorepo-friendly: split registries across workspaces, with cross-registry references.
- Avoid duplication: with macros, the same file can be installed for multiple frameworks.
Same as Shadcn CLI, it ships code that adapts to the consumer's codebase, allowing full control over the installed code. What is different:
- Distribution: your registry is consumed through your own CLI tool rather than the
shadcnCLI. - More control: you own the installer, e.g. reuse files the consumer already has, or transform contents on install.
How it works
- Declare your components, and the rules for installing files.
- Compile the registry with Fuma CLI.
- Serve the output via CDNs/Web.
- In your CLI package, install components using the Fuma CLI installer.
Last updated on