@farming-labs/docs
An AI-native documentation framework built on top of and other preset providers. One config file, zero boilerplate, with docs that are ready for humans, IDEs, and agents 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 JSON-LD structured data, llms.txt, sitemaps, generated
robots.txt, anddocs agent compactkeep the machine-readable layer lean too. Learn more → - Multiple frameworks — First-class support for Next.js, TanStack Start, SvelteKit, Astro, and Nuxt that just works.
- 11 themes — Default, Darksharp, Pixel Border, Colorful, Shiny, Ledger, DarkBold, GreenTree, Concrete, Command Grid, and Hardline — or build your own with
createTheme(). - Built-in search — Zero-config simple search by default, or upgrade to Typesense, Algolia, or a custom adapter.
- 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.
Looking Ahead: Cloud
Cloud is the infrastructure layer we are building around @farming-labs/docs.
You ship the code and we write the docs for you.
The open runtime stays yours. Cloud adds the managed layer around it for teams that want stronger search, retrieval, analytics, review workflows, and agent-ready docs operations without giving up Git as the source of truth.
Join the waitlist to be an early user →
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, sitemaps, generated
robots.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 an AI-native docs runtime, one config, multiple frameworks, and minimal boilerplate — 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 — Built-in simple search works out of the box, and you can switch to Typesense, Algolia, or a custom adapter from 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 whose page links point directly to markdown routes. Options described in the llms.txt docs.
- Sitemaps — XML and Markdown maps of canonical docs URLs, descriptions, related pages, and freshness metadata. Runtime routes are enabled by default.
- Robots.txt — Runtime agent-friendly crawl policy at
/robots.txtwhen no static file already exists; usedocs robots generatefor static export or committed policies.
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
- Guides — Long-form playbooks, starting with writing agent-friendly docs
- Token Efficiency — Why this is the most AI-friendly docs framework
- Cloud — Where the managed infrastructure layer for humans and agents is heading
- 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?