New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@farming-labs/docs

Package Overview
Dependencies
Maintainers
1
Versions
366
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@farming-labs/docs

Modern, flexible MDX-based docs framework — core types, config, and CLI

latest
npmnpm
Version
0.2.132
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@farming-labs/docs

AI-native documentation for Next.js, TanStack Start, SvelteKit, Astro, and Nuxt.

Write Markdown or MDX, configure your docs in TypeScript, and ship a polished documentation experience for people, IDEs, and AI agents. @farming-labs/docs provides the shared configuration, types, content pipeline, agent tooling, and CLI used by the Farming Labs framework adapters.

Features

  • One docs.config.ts file for routing, themes, search, metadata, feedback, and AI features
  • Framework adapters for Next.js, TanStack Start, SvelteKit, Astro, and Nuxt
  • Built-in themes and MDX components such as Callout, Tabs, HoverLink, and Prompt
  • Built-in search, generated API references, and Next.js changelog pages
  • Machine-readable .md routes, llms.txt, sitemaps, JSON-LD, agent discovery, and MCP
  • CLI workflows for scaffolding, upgrades, documentation health checks, and static agent files

Quick start

Run the interactive setup inside an existing project:

npx @farming-labs/docs@latest init

Or bootstrap a new documentation project from a template:

npx @farming-labs/docs@latest init --template next --name my-docs

Available templates are next, tanstack-start, sveltekit, astro, and nuxt. The CLI installs the packages for your framework, creates the config and starter pages, and adds the theme CSS.

Framework packages

FrameworkCore and adapterTheme
Next.js@farming-labs/docs, @farming-labs/next@farming-labs/theme
TanStack Start@farming-labs/docs, @farming-labs/tanstack-start@farming-labs/theme
SvelteKit@farming-labs/docs, @farming-labs/svelte@farming-labs/svelte-theme
Astro@farming-labs/docs, @farming-labs/astro@farming-labs/astro-theme
Nuxt@farming-labs/docs, @farming-labs/nuxt@farming-labs/nuxt-theme

Basic configuration

Every framework uses defineDocs(). A minimal Next.js config looks like this:

import { defineDocs } from "@farming-labs/docs";
import { fumadocs } from "@farming-labs/theme";

export default defineDocs({
  entry: "docs",
  theme: fumadocs(),
  metadata: {
    titleTemplate: "%s – Docs",
    description: "My documentation site",
  },
});

Next.js projects also wrap next.config.ts:

import { withDocs } from "@farming-labs/next/config";

export default withDocs();

Import your selected theme in the app's global stylesheet:

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

Import the CSS for the selected preset. The default fumadocs() preset uses @farming-labs/theme/default/css. SvelteKit, Astro, and Nuxt import their theme helpers from the corresponding packages shown above; the CLI wires up the right config and CSS automatically.

Write content in Markdown or MDX

---
title: "Installation"
description: "Get up and running"
---

# Installation

Your documentation starts here.

Routing is file-based, so a page such as app/docs/guides/deployment/page.mdx becomes /docs/guides/deployment in Next.js. The CLI scaffolds the correct directory layout for every supported framework.

MDX compiler integration

Custom MDX integrations can import remarkCodeGroup, applyDocsMarkdownHeadingAnchors, encodeDocsHeadingTocUrls, isolateDocsMarkdownPromptReferences, and withDocsMarkdownRenderableHeadings from @farming-labs/docs/mdx. This entry point exposes the same helpers without loading the unrelated core/server runtime exports. Existing imports from the root and server entry points remain supported.

Documentation for agents

Farming Labs can expose the same docs in machine-readable forms, including:

  • llms.txt and full-document feeds
  • Markdown routes for individual pages
  • skill.md, multi-skill discovery with hashed companion assets, AGENTS.md, and agent discovery endpoints
  • A built-in Model Context Protocol (MCP) server
  • Schema.org JSON-LD, sitemaps, and generated robots.txt
  • Agent-focused health checks with docs doctor --agent

Learn more

  • Documentation
  • Configuration reference
  • Themes
  • Examples
  • GitHub repository

License

MIT

Keywords

docs

FAQs

Package last updated on 25 Oct 2026

Related posts