@farming-labs/docs
A modern documentation framework built on top of and other preset providers. One config file, zero boilerplate, beautiful themes out of the box.
Why @farming-labs/docs?
- Zero boilerplate — No layout files, no
[[...slug]]wrappers except for fully fledged functionality like AI, Search and metadata to work. Just write Markdown or MDX. - One config — Everything in
docs.config.ts: theme, colors, typography, icons, components, metadata. - Token efficient — Your entire docs framework surface is a single config file (~15 lines). AI tools like Cursor, Copilot, and Claude spend less time reading framework plumbing and more time working with your actual content. Built-in llms.txt serves your docs in LLM-optimized format automatically. Learn more →
- Multiple frameworks — First-class support for Next.js, TanStack Start, SvelteKit, Astro, and Nuxt that just works.
- 7 themes — Default, Darksharp, Pixel Border, Colorful, Shiny, DarkBold, and GreenTree — or build your own with
createTheme(). - Built-in search — Full-text search powered by Orama. No API keys.
- CLI scaffolding —
npx @farming-labs/docs initfirst asks whether you're on an existing project or starting fresh; then it detects your framework, lets you pick a theme (or create your own), can scaffold locale folders for i18n, and generates config, routes, and sample pages. Use--templatewith--nameto bootstrap a new project without prompts.
other docs frameworks?
Complementary, not a replacement
We are not trying to replace Fumadocs — we aim to be complementary. @farming-labs/docs builds on (and other providers) to offer a single config, multi-framework support, and optional themes and tooling, so you can use Fumadocs with less boilerplate and across Next.js, TanStack Start, SvelteKit, Astro, and Nuxt.
If you're choosing between documentation tools, here’s when @farming-labs/docs is a good fit:
- vs. Fumadocs alone — You get the same UI and MDX experience, but with a single
docs.configand first-class support for TanStack Start, SvelteKit, Astro, and Nuxt — not just Next.js. One config model and CLI so you don’t wire layouts, themes, and search by hand. - vs. Docusaurus / VitePress — You keep full control inside your existing app (Next, TanStack Start, SvelteKit, Astro, Nuxt) instead of a separate docs site. No separate framework or build; your docs live in the same repo and stack, with one config file and optional built-in AI chat and search.
- vs. Mintlify / ReadMe / hosted docs — You own the code and hosting. No vendor lock-in or per-seat pricing; you can deploy to Vercel, Cloudflare Pages, or anywhere. Built-in llms.txt and AI chat give you AI-friendly docs without a third-party docs platform.
- vs. hand-rolled MDX — No need to build layouts, catch-all routes, search, or theming yourself. The CLI scaffolds everything; you spend time on content and optional customization (themes, colors, sidebar, page actions) instead of framework plumbing.
In short: use @farming-labs/docs when you want one config, multiple frameworks, minimal boilerplate, and optional AI/search built in — without leaving your current stack or adopting a separate docs-only framework.
Customize themes and share them
You can create your own theme and distribute it to others — as an npm package, a shared preset, or a CSS file. Themes control layout, colors, typography, and components; once built, anyone can plug them in via config. See Themes for built-in presets and Creating themes for the full API.
Built-in docs UI — enable and customize from config
Modern docs features are built in; you turn them on in configuration instead of wiring them yourself. Each element can be customized — layout, behavior, and appearance — via the same config and theme options. See Customization for the full overview.
- Ask AI — RAG-powered chat, multiple models and providers, floating or sidebar mode. Customize labels, suggested questions, model list, and UI mode.
- Search — Full-text search (Orama) is included by default; configure via configuration.
- Page actions — Copy Markdown, open in ChatGPT/other tools. Customize which actions appear and their options.
- Sidebar — Collapsible, flat or nested, banner, footer. Customize structure, style, and content (banner, footer, nav title).
- Components — Built-in MDX components like
Callout,Tabs, andHoverLink, plus your own custom React components. - llms.txt — LLM-friendly index of your docs; served when the docs API is enabled. Options described in the llms.txt docs.
Theme-level customization (colors, typography, components) is covered in Configuration and Customization (including Colors and Typography). No custom components or routes required — enable and tweak what you need in docs.config.
Packages
| Package | Description |
|---|---|
@farming-labs/docs | Core types, defineDocs(), createTheme(), extendTheme() |
@farming-labs/theme | Next.js theme presets, layout components, CSS presets |
@farming-labs/next | Next.js adapter — withDocs(), MDX processing, search API |
@farming-labs/tanstack-start | TanStack Start adapter — docs page renderer, MDX processing, search API, server loader |
@farming-labs/svelte | SvelteKit adapter — server-side docs loader, markdown processing |
@farming-labs/svelte-theme | SvelteKit theme presets, DocsLayout, DocsContent components |
@farming-labs/astro | Astro adapter — server-side docs loader, markdown processing |
@farming-labs/astro-theme | Astro theme presets, DocsLayout, DocsContent components |
@farming-labs/nuxt | Nuxt 3 adapter — defineDocsHandler(), server-side docs loader, markdown processing |
@farming-labs/nuxt-theme | Nuxt theme presets, DocsLayout, DocsContent components |
Quick Start
The fastest way to get started is with the CLI:
npx @farming-labs/docs initpnpm dlx @farming-labs/docs inityarn dlx @farming-labs/docs initbunx @farming-labs/docs initThe CLI first asks existing project or fresh? — then (for existing) auto-detects your framework, lets you pick a theme or create your own, can scaffold locale folders and i18n config, and generates config, routes, CSS, and sample pages. Prompts with a default (e.g. entry path docs) accept Enter to skip typing. See the CLI reference for the full init flow, or set up manually with the Installation guide.
Next Steps
- Token Efficiency — Why this is the most AI-friendly docs framework
- Configuration — Customize your theme, colors, typography, sidebar, and more
- Themes — Browse available themes and learn how to create your own
- Customization — Colors, typography, sidebar, AI chat, page actions
- Ask AI — Add RAG-powered AI chat to your docs
- API Reference — Complete reference for every config option
- Contributing — How to report issues, suggest features, and submit pull requests
How is this guide?