@farming-labs/docs

CLI

The @farming-labs/docs CLI scaffolds a documentation project in seconds.

Usage

npx @farming-labs/docs init

What it does

  1. Detects your framework — Currently supports Next.js (more coming)
  2. Asks for a theme — Choose between fumadocs, darksharp, or pixel-border
  3. Asks for the entry path — Default is docs (creates pages under app/docs/)
  4. Generates files:
    • docs.config.ts — Full config with your selected theme
    • next.config.ts — Wraps your existing config with withDocs()
    • app/global.css — Imports Tailwind and theme CSS
    • app/docs/page.mdx — Sample documentation page
    • app/docs/installation/page.mdx — Sample installation guide
  5. Installs dependencies — Runs pnpm add (or npm/yarn) for all required packages
  6. 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/docs

Flags

FlagDescription
--theme <name>Skip theme prompt (e.g. --theme pixel-border)
--entry <path>Skip entry path prompt (e.g. --entry docs)

On this page

No Headings