CLI
The @farming-labs/docs CLI scaffolds a documentation project in seconds.
Usage
npx @farming-labs/docs initWhat it does
- Detects your framework — Currently supports Next.js (more coming)
- Asks for a theme — Choose between
fumadocs,darksharp, orpixel-border - Asks for the entry path — Default is
docs(creates pages underapp/docs/) - Generates files:
docs.config.ts— Full config with your selected themenext.config.ts— Wraps your existing config withwithDocs()app/global.css— Imports Tailwind and theme CSSapp/docs/page.mdx— Sample documentation pageapp/docs/installation/page.mdx— Sample installation guide
- Installs dependencies — Runs
pnpm add(or npm/yarn) for all required packages - Starts the dev server — Opens your docs at
http://localhost:3000/docs
Example Output
$ npx @farming-labs/docs init
┌ @farming-labs/docs init
│
◆ Detected framework: Next.js
│
◆ Select a theme:
│ ● fumadocs (default neutral theme)
│ ○ darksharp (all-black, sharp corners)
│ ○ pixel-border (better-auth inspired)
│
◆ Entry path for docs:
│ docs
│
◇ Generated docs.config.ts
◇ Generated next.config.ts
◇ Generated app/global.css
◇ Generated app/docs/page.mdx
◇ Generated app/docs/installation/page.mdx
│
◇ Installing dependencies...
◇ Starting dev server...
│
└ Done! Open http://localhost:3000/docsFlags
| Flag | Description |
|---|---|
--theme <name> | Skip theme prompt (e.g. --theme pixel-border) |
--entry <path> | Skip entry path prompt (e.g. --entry docs) |