Fumadocs

create-fumadocs-app

The CLI to create new Fumadocs apps

Usage

npx create-fumadocs-app@latest my-docs

It asks for the template and features to configure, you can also pass them as options.

Options

OptionDescription
--template <name>The template to use, see Templates.
--src(Next.js only) Use the src/ directory.
--linter <name>Configure a linter: eslint (Next.js only), oxlint or biome.
--search <name>Search solution: orama (default, local search) or orama-cloud.
--og-image <name>(Next.js only) OG image generation: next-og or takumi, other templates use Takumi.
--ai-chat <name>AI chat: openrouter, llmgateway or inkeep, not available on static & SPA templates.
--installInstall dependencies automatically.
--no-gitSkip Git repository initialization.
--pm <name>Package manager: npm, pnpm, yarn or bun, detected from how the CLI is invoked.
-y, --yesSkip prompts, use defaults for options not specified.

Templates

ValueDescription
+next+fuma-docs-mdxNext.js (default)
+next+fuma-docs-mdx+staticNext.js with static export
wakuWaku
react-routerReact Router
react-router-spaReact Router in SPA mode
tanstack-startTanstack Start
tanstack-start-spaTanstack Start in SPA mode
astroAstro with React islands (partial support)

Non-interactive

Pass --yes to skip prompts, useful for scripts, CI and AI agents:

npx create-fumadocs-app@latest my-docs --template +next+fuma-docs-mdx --install --yes

Options you didn't specify use their defaults: no linter, local search, no AI chat. It fails when the target directory already exists and is not empty.

Programmatic API

Despite the classical CLI usage, you can also use it in scripts like:

npm install create-fumadocs-app
import { create } from 'create-fumadocs-app';

await create({
  outputDir: 'my-app',
  template: '+next+fuma-docs-mdx',
  packageManager: 'pnpm',
});

How is this guide?

Last updated on

On this page