For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Book a demoLog inStart for free
  • Getting started
    • Overview
    • How it works
    • Quickstart
    • Project structure
    • Customer showcase
    • Changelog
  • Configuration
    • Overview
    • Site-level settings
    • Page-level settings
  • Writing content
    • Markdown basics
    • Rich media in Markdown
    • Fern Editor
    • Reusable snippets
  • AI features
    • Overview
    • Fern Writer
    • AI-generated examples
    • Markdown access
      • Overview
      • Customize LLM output
      • Agent directives
      • Analytics and integration
    • MCP server
    • API catalog discovery
      • Overview
        • REST API Reference
        • Webhook Reference
        • WebSocket Reference
        • OpenRPC Reference
        • gRPC Reference
        • GraphQL Reference
        • Library Reference
  • Public API
    • GETJWT from Fern API key
    • GETAlgolia search credentials
    • GETCurrent user information
  • Fern Writer API
    • GETGet Fern Writer Install Link
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
Book a demoLog inStart for free
On this page
  • Configuration
  • Customize generated docs (optional)
  • Configuration reference
API ReferencesGeneration

Library docs generator Beta

||View as Markdown|
Was this page helpful?
Edit this page
Previous

Generate GraphQL Reference

Next

Customize API Reference layout

The library docs generator parses your Python or C++ library source code and generates MDX documentation pages for modules, classes, functions, methods, and parameters. Generated pages are added to your Fern Docs site with hierarchical navigation.

Cross-links are automatic. When a fully-qualified identifier appears in a code block — for example, in a class signature or type annotation — the generator links it to the page documenting that symbol, so readers can jump straight to the definition.

Configuration

1

Define your libraries in docs.yml

Add a libraries entry to your docs.yml file. Each library needs an input source (the repo to parse), an output.path (where generated MDX files are written), and a lang (python or cpp).

docs.yml
1libraries:
2 plant-core:
3 input:
4 git: https://github.com/acme/plant-core-cpp # repository URL
5 subpath: packages/plant-core # optional, for monorepos
6 output:
7 path: ./static/plant-core-docs # relative to fern/ directory
8 lang: cpp # python or cpp
9 config:
10 doxyfile: ./Doxyfile # optional, C++ only

You can define multiple libraries in the same file.

2

Add to navigation

Point a folder: entry in your navigation at the same directory you set as output.path. Fern discovers every MDX file in that folder and mirrors its subfolder structure into sidebar sections.

docs.yml
1navigation:
2 - section: Getting started
3 contents:
4 - page: Overview
5 path: ./pages/overview.mdx
6 - section: Plant SDK Reference
7 contents:
8 - folder: ./static/plant-sdk-docs
3

Generate the library docs

Run the CLI command to generate MDX files from your library source code:

$fern docs md generate

The command clones the repository, parses the source code, and writes MDX files to the output directory.

If you have multiple libraries configured, fern docs md generate processes all libraries in parallel. Use --library plant-sdk to generate docs for a specific library only.

4

Preview locally

Run the local development server to see your library docs alongside the rest of your site:

$fern docs dev

The library docs appear as a navigation section with pages for each module, class, function, and type in your library.

5

Publish

Publish your library documentation:

$fern generate --docs
Multiple libraries example

You can define and reference multiple libraries in the same docs.yml:

docs.yml
1libraries:
2 plant-python-sdk:
3 input:
4 git: https://github.com/acme/plant-sdk-python
5 output:
6 path: ./static/python-docs
7 lang: python
8 plant-core:
9 input:
10 git: https://github.com/acme/plant-core-cpp
11 output:
12 path: ./static/cpp-docs
13 lang: cpp
14
15navigation:
16 - section: Python SDK Reference
17 contents:
18 - folder: ./static/python-docs
19 - section: C++ API Reference
20 contents:
21 - folder: ./static/cpp-docs

Customize generated docs (optional)

You can reorganize the output directory to restructure the sidebar navigation. Move, rename, or nest files and subfolders, and Fern picks up the new layout on the next fern docs dev or publish.

For example, splitting ./static/plant-sdk-docs into getting-started/ and reference/ subfolders produces two sidebar sections:

docs.yml
1navigation:
2 - section: Plant SDK Reference
3 contents:
4 - folder: ./static/plant-sdk-docs/getting-started
5 title: Getting started
6 - folder: ./static/plant-sdk-docs/reference
7 title: API reference

You can also edit page content by modifying the MDX files directly — generated pages are standard MDX, so you can add prose, examples, callouts, or any component. Re-running fern docs md generate overwrites everything in output.path, so commit your customizations first, and keep hand-edited pages outside the output directory if you plan to regenerate.

Configuration reference

input.git
stringRequired

GitHub URL of the repository containing the library source code.

input.subpath
string

Path within the repository to the library source. Useful for monorepos.

output.path
stringRequired

Directory where the generated MDX files are written, relative to the fern/ directory.

lang
stringRequired

The language of the library. Supported values: python, cpp.

config.doxyfile
string

Path to a custom Doxyfile. C++ only.