From 0320f5ed250e99220c0bd1fa81cfdcb0b6c38e53 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 20:41:06 +0000 Subject: [PATCH 1/3] Add library docs documentation page and changelog entry Co-Authored-By: paarth@buildwithfern.com --- fern/products/docs/docs.yml | 4 + .../api-references/generate-library-ref.mdx | 112 ++++++++++++++++++ .../docs/pages/changelog/2026-02-12.mdx | 5 + 3 files changed, 121 insertions(+) create mode 100644 fern/products/docs/pages/api-references/generate-library-ref.mdx create mode 100644 fern/products/docs/pages/changelog/2026-02-12.mdx diff --git a/fern/products/docs/docs.yml b/fern/products/docs/docs.yml index c2c8e18a6..516286441 100644 --- a/fern/products/docs/docs.yml +++ b/fern/products/docs/docs.yml @@ -279,6 +279,10 @@ navigation: - page: Generate GraphQL Reference path: ./pages/api-references/generate-graphql-ref.mdx slug: generate-graphql-ref + - page: Generate library reference + path: ./pages/api-references/generate-library-ref.mdx + slug: generate-library-ref + availability: beta - section: SEO & GEO slug: seo collapsed: true diff --git a/fern/products/docs/pages/api-references/generate-library-ref.mdx b/fern/products/docs/pages/api-references/generate-library-ref.mdx new file mode 100644 index 000000000..4b02c406f --- /dev/null +++ b/fern/products/docs/pages/api-references/generate-library-ref.mdx @@ -0,0 +1,112 @@ +--- +title: Generate library reference +description: Use Fern Docs to generate library reference documentation from your library's source code. +availability: beta +--- + +Fern generates library reference documentation directly from your library's source code. Point Fern at a GitHub repository and it parses the source to produce a browsable reference with classes, functions, attributes, and module hierarchy. Python is supported. + +## Configuration + + + + +Define each library with an `input` source location, `output` directory for the generated pages, and the source `lang`. + +```yaml docs.yml +libraries: + my-python-sdk: + input: + git: https://github.com/your-org/your-python-sdk + subpath: src/my_sdk # optional path within the repo + output: + path: ./generated/my-python-sdk + lang: python +``` + + + + +Run the CLI command to parse your library and generate MDX files: + +```bash +fern docs md generate +``` + +To generate docs for a single library, pass the `--library` flag: + +```bash +fern docs md generate --library my-python-sdk +``` + +Fern authenticates with FDR, parses the library source on the server, and writes MDX files and a `_navigation.yml` file to the configured output directory. + + + + +Reference the library in your `docs.yml` navigation using the `library` key. The value must match a key in your `libraries` section. + +```yaml docs.yml +navigation: + - section: Getting started + contents: + - page: Overview + path: ./pages/overview.mdx + - library: my-python-sdk + title: Python SDK Reference + slug: python-sdk +``` + +Fern injects the generated navigation at this point in the sidebar, with the root module page as the section overview. + + + + +## Configuration reference + +### Library definition + + + GitHub URL to the repository containing the library source code. + + + + Path within the repository to the library source. Use this when the library code is in a subdirectory. + + + + Directory where Fern writes the generated MDX files and `_navigation.yml`. + + + + Programming language of the library source code. Supported values: `python`. + + +### Navigation item + + + The name of the library to reference. Must match a key in the `libraries` section. + + + + Override the display title for this library reference in the sidebar. + + + + Override the URL slug for this library reference. + + +## Generated output + +The `fern docs md generate` command produces: + +- **MDX pages** for each module, with summary tables and detailed API definitions for classes, functions, and attributes +- **`_navigation.yml`** describing the module hierarchy for sidebar navigation + +During local development with `fern docs dev`, the generated pages are resolved as first-class navigation sections with cross-reference links between types. + +## Supported languages + +| Language | Status | +|----------|--------| +| Python | Beta | diff --git a/fern/products/docs/pages/changelog/2026-02-12.mdx b/fern/products/docs/pages/changelog/2026-02-12.mdx new file mode 100644 index 000000000..dc508d394 --- /dev/null +++ b/fern/products/docs/pages/changelog/2026-02-12.mdx @@ -0,0 +1,5 @@ +## Generate library reference (beta) + +Generate browsable reference documentation directly from your library's source code. Define a `libraries` section in `docs.yml`, run `fern docs md generate`, and add a `library` navigation item to include the generated pages in your sidebar. Python is supported. + +Learn more about [generating library references](/learn/docs/api-references/generate-library-ref). From 051f9d6a0b770b416ec971a3b5ea87feda3cbdfa Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 20:48:30 +0000 Subject: [PATCH 2/3] Move library docs to top-level section, add C++ in development status Co-Authored-By: paarth@buildwithfern.com --- fern/products/docs/docs.yml | 5 ++++- .../docs/pages/api-references/generate-library-ref.mdx | 7 ++++--- fern/products/docs/pages/changelog/2026-02-12.mdx | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/fern/products/docs/docs.yml b/fern/products/docs/docs.yml index 516286441..05c46df62 100644 --- a/fern/products/docs/docs.yml +++ b/fern/products/docs/docs.yml @@ -279,10 +279,13 @@ navigation: - page: Generate GraphQL Reference path: ./pages/api-references/generate-graphql-ref.mdx slug: generate-graphql-ref + - section: Library references + availability: beta + collapsed: true + contents: - page: Generate library reference path: ./pages/api-references/generate-library-ref.mdx slug: generate-library-ref - availability: beta - section: SEO & GEO slug: seo collapsed: true diff --git a/fern/products/docs/pages/api-references/generate-library-ref.mdx b/fern/products/docs/pages/api-references/generate-library-ref.mdx index 4b02c406f..9652b45fb 100644 --- a/fern/products/docs/pages/api-references/generate-library-ref.mdx +++ b/fern/products/docs/pages/api-references/generate-library-ref.mdx @@ -107,6 +107,7 @@ During local development with `fern docs dev`, the generated pages are resolved ## Supported languages -| Language | Status | -|----------|--------| -| Python | Beta | +| Language | Status | +|----------|----------------| +| Python | Beta | +| C++ | In development | diff --git a/fern/products/docs/pages/changelog/2026-02-12.mdx b/fern/products/docs/pages/changelog/2026-02-12.mdx index dc508d394..c8a796935 100644 --- a/fern/products/docs/pages/changelog/2026-02-12.mdx +++ b/fern/products/docs/pages/changelog/2026-02-12.mdx @@ -1,5 +1,5 @@ ## Generate library reference (beta) -Generate browsable reference documentation directly from your library's source code. Define a `libraries` section in `docs.yml`, run `fern docs md generate`, and add a `library` navigation item to include the generated pages in your sidebar. Python is supported. +Generate browsable reference documentation directly from your library's source code. Define a `libraries` section in `docs.yml`, run `fern docs md generate`, and add a `library` navigation item to include the generated pages in your sidebar. Python is supported, with C++ in active development. -Learn more about [generating library references](/learn/docs/api-references/generate-library-ref). +Learn more about [generating library references](/learn/docs/library-references/generate-library-ref). From 77d456684011fd4d4d3b22f9ed73f925cf895724 Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Thu, 12 Feb 2026 16:45:40 -0500 Subject: [PATCH 3/3] restructure info a bit --- .../api-references/generate-library-ref.mdx | 43 ++++++++----------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/fern/products/docs/pages/api-references/generate-library-ref.mdx b/fern/products/docs/pages/api-references/generate-library-ref.mdx index 9652b45fb..134e5b14b 100644 --- a/fern/products/docs/pages/api-references/generate-library-ref.mdx +++ b/fern/products/docs/pages/api-references/generate-library-ref.mdx @@ -4,7 +4,14 @@ description: Use Fern Docs to generate library reference documentation from your availability: beta --- -Fern generates library reference documentation directly from your library's source code. Point Fern at a GitHub repository and it parses the source to produce a browsable reference with classes, functions, attributes, and module hierarchy. Python is supported. +Fern generates library reference documentation directly from your library's source code. Point Fern at a GitHub repository and it produces a browsable reference for your docs site that includes: + +- **MDX pages** for each module, with summary tables and detailed definitions for classes, functions, and attributes +- **`_navigation.yml`** describing the module hierarchy for sidebar navigation + + + Supported languages: Python (beta) and C++ (in development). + ## Configuration @@ -39,14 +46,12 @@ To generate docs for a single library, pass the `--library` flag: fern docs md generate --library my-python-sdk ``` -Fern authenticates with FDR, parses the library source on the server, and writes MDX files and a `_navigation.yml` file to the configured output directory. - Reference the library in your `docs.yml` navigation using the `library` key. The value must match a key in your `libraries` section. -```yaml docs.yml +```yaml docs.yml {6} navigation: - section: Getting started contents: @@ -59,6 +64,10 @@ navigation: Fern injects the generated navigation at this point in the sidebar, with the root module page as the section overview. + + During local development with `fern docs dev`, the generated pages are resolved as first-class navigation sections with cross-reference links between types. + + @@ -66,19 +75,21 @@ Fern injects the generated navigation at this point in the sidebar, with the roo ### Library definition - +Each entry under `libraries` in `docs.yml` accepts the following fields: + + GitHub URL to the repository containing the library source code. - + Path within the repository to the library source. Use this when the library code is in a subdirectory. - + Directory where Fern writes the generated MDX files and `_navigation.yml`. - + Programming language of the library source code. Supported values: `python`. @@ -95,19 +106,3 @@ Fern injects the generated navigation at this point in the sidebar, with the roo Override the URL slug for this library reference. - -## Generated output - -The `fern docs md generate` command produces: - -- **MDX pages** for each module, with summary tables and detailed API definitions for classes, functions, and attributes -- **`_navigation.yml`** describing the module hierarchy for sidebar navigation - -During local development with `fern docs dev`, the generated pages are resolved as first-class navigation sections with cross-reference links between types. - -## Supported languages - -| Language | Status | -|----------|----------------| -| Python | Beta | -| C++ | In development |