Introduction
The Fumadocs CLI (@fumadocs/cli) is a powerful command-line tool that streamlines the process of working with Fumadocs. It provides commands for installing components from the registry, customizing layouts, generating file trees, and managing your documentation project configuration.
Package:
@fumadocs/cliVersion: 1.2.5Binary: fumadocsInstallation
Install the Fumadocs CLI as a development dependency in your project:Quick Start
Initialize a CLI configuration file in your project:cli.json file with sensible defaults based on your project structure.
Key Features
Component Installation
Install pre-built components from the Fumadocs registry with automatic dependency resolution.
Layout Customization
Clone and customize Fumadocs UI layouts including Docs, Home, Notebook, and Flux variants.
File Tree Generation
Generate file tree components from directory structures for documentation.
Multi-Registry Support
Access components from multiple registries including local directories and remote URLs.
Available Commands
The Fumadocs CLI provides the following commands:fumadocs
Initialize a new configuration file.
fumadocs add
Install components from the registry.
fumadocs customise
Customize Fumadocs UI layouts interactively.
Also available as
fumadocs customize (American spelling).fumadocs tree
Generate file tree components from directory structures.
Registry Shortcuts
The CLI supports convenient shortcuts for common registry sources:| Shortcut | Expands To |
|---|---|
:preview | https://preview.fumadocs.dev/registry |
:dev | http://localhost:3000/registry |
| (default) | https://fumadocs.dev/registry |
UI Library Support
Fumadocs CLI supports multiple UI libraries:- Radix UI (default):
fumadocs/radix-ui - Base UI:
fumadocs/base-ui
Next Steps
Commands Reference
Detailed documentation for all CLI commands and their options.
Configuration
Learn how to configure the CLI for your project structure.