PUBLIC BETA

a documentation
that just works.

A modern documentation framework that works. One config file, zero boilerplate.

Get Started
Quick Start

Up and running in minutes

Easily scaffold your docs with the CLI. It auto-detects your framework and scaffolds everything.

Setup beautiful documentation in seconds

Or set up manually
1

Install

Add the core packages to your Next.js project.

shell
Terminal
pnpm add @farming-labs/docs @farming-labs/theme @farming-labs/next
2

Configure

One file. Theme, metadata, components, icons — everything.

docs.config.ts
Config
import { defineDocs } from "@farming-labs/docs";
import { pixelBorder } from "@farming-labs/theme/pixel-border";

export default defineDocs({
  entry: "docs",
  theme: pixelBorder(),
  metadata: {
    titleTemplate: "%s – My Docs",
  },
});
3

Next Config

Wrap your config with withDocs(). Handles MDX, routing, and search.

next.config.ts
Next Config
import { withDocs } from "@farming-labs/next/config";

export default withDocs({});
4

Root Layout

Wrap your app with RootProvider for search, theme switching, and AI.

app/layout.tsx
Root Layout
import { RootProvider } from "@farming-labs/theme";
import "./global.css";

export default function RootLayout({ children }) {
  return (
    <html lang="en" suppressHydrationWarning>
      <body>
        <RootProvider>{children}</RootProvider>
      </body>
    </html>
  );
}

In app/global.css, import your theme's CSS so docs styling applies (e.g. @import "@farming-labs/theme/default/css"; — use the path that matches your theme).

5

Write docs

Create MDX files under app/docs/. Frontmatter for metadata. That's it.

app/docs/getting-started/page.mdx
MDX Page
---
title: "Getting Started"
description: "Set up in 5 minutes"
icon: "rocket"
---

# Getting Started

Write your content in **MDX** with
frontmatter for metadata.

```ts title="auth.ts"
export const auth = betterAuth({
  database: { provider: "postgresql" },
});
```

See the full installation walkthrough for all generated files and options.

Themes

More themes. Your choice.

Pick a preset or build your own with createTheme(). Override any styles from config.


Default


Clean, neutral palette with standard border radius

@import "@farming-labs/theme/default/css";

Darksharp


All-black, sharp corners, no rounded edges

@import "@farming-labs/theme/darksharp/css";

Pixel Border


Inspired by better-auth.com — refined dark UI

@import "@farming-labs/theme/pixel-border/css";

Colorful


Faithful clone of the fumadocs default neutral theme

@import "@farming-labs/theme/colorful/css";

Shiny


Clerk docs-inspired — clean, polished purple accents

@import "@farming-labs/theme/shiny/css";

DarkBold


Pure monochrome design — clean, bold, minimal

@import "@farming-labs/theme/darkbold/css";

GreenTree


Mintlify-inspired — emerald green, Inter font, modern

@import "@farming-labs/theme/greentree/css";

Hardline


Original hard-edge preset with square corners and strong borders

@import "@farming-labs/theme/hardline/css";

Concrete


Louder brutalist variant with offset shadows and poster-style contrast

@import "@farming-labs/theme/concrete/css";
docs.config.ts
Custom Colors
theme: pixelBorder({
  ui: {
    colors: {
      primary: "oklch(0.72 0.19 149)",     // green
      accent: "hsl(220 80% 60%)",          // blue
    },
  },
}),
Configuration

One file. Full control.

docs.config.ts
Full Example
import { defineDocs } from "@farming-labs/docs";
import { pixelBorder } from "@farming-labs/theme/pixel-border";
import { Rocket, BookOpen, Code } from "lucide-react";

export default defineDocs({
  entry: "docs",
  theme: pixelBorder({
    ui: {
      colors: { primary: "oklch(0.72 0.19 149)" },
      typography: {
        font: {
          h1: { size: "2.25rem", weight: 700 },
          body: { size: "0.975rem", lineHeight: "1.8" },
        },
      },
    },
  }),

  nav: {
    title: <div style={{ display: "flex", gap: 8 }}>
      <Rocket size={14} /> My Docs
    </div>,
  },

  icons: {
    rocket: <Rocket size={16} />,
    book: <BookOpen size={16} />,
    code: <Code size={16} />,
  },
  sidebar: {
    banner: (
      <div>
        <h2>Welcome to the docs</h2>
        <p>This is a banner</p>
      </div>
    ),
    flat: false,
    collapsible: true,  
    footer: (
      <div>
        <p>This is a footer</p>
      </div>
    ),
  },
  components: { MyCustomCallout },

  breadcrumb: { enabled: true },
  themeToggle: { enabled: false, default: "dark" },
  ai: {
    enabled: true,
    mode: "floating",
    floatingStyle: "full-modal",
    apiKey: process.env.OPENAI_API_KEY,
    maxResults: 5,
    aiLabel: "DocsBot",
    suggestedQuestions: [
      "How do I get started?",
      "What themes are available?",
      "How do I create a custom component?",
      "How do I configure the sidebar?",
    ],
    model: {
      models: [
        { id: "gpt-4o-mini", label: "GPT-4o mini (fast)" },
        { id: "gpt-4o", label: "GPT-4o (quality)" },
      ],
      defaultModel: "gpt-4o-mini",
    },
  },
  pageActions: {
    copyMarkdown: { enabled: true },
    openDocs: {
      enabled: true,
      providers: [
        { name: "ChatGPT", urlTemplate: "https://chatgpt.com/?q={url}" },
      ],
    },
  },

  metadata: {
    titleTemplate: "%s – Docs",
    description: "My documentation site",
  },
});