From 822b872650b79b158dcc345706593705285ce8b8 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 21:16:35 +0000 Subject: [PATCH 1/3] Document git input support for fern docs md generate --local --- .../cli-changelog/2026-08-24.mdx | 8 +++++ .../cli-api-reference/pages/docs-commands.mdx | 4 +-- .../pages/api-references/library-docs.mdx | 32 +++++++++++-------- .../docs/pages/changelog/2026-08-24.mdx | 11 +++++++ 4 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 fern/products/docs/pages/changelog/2026-08-24.mdx diff --git a/fern/products/cli-api-reference/cli-changelog/2026-08-24.mdx b/fern/products/cli-api-reference/cli-changelog/2026-08-24.mdx index 3e3bb5c12d..4e760db410 100644 --- a/fern/products/cli-api-reference/cli-changelog/2026-08-24.mdx +++ b/fern/products/cli-api-reference/cli-changelog/2026-08-24.mdx @@ -1,3 +1,11 @@ +## 5.103.0 +**`(feat):`** `fern docs md generate --local` now resolves library documentation inputs from git +repositories. Pass `--local` with a `git` input to have the CLI shallow-clone the repository +on your machine (respecting `ref` and `subpath`), run the parser in Docker locally, and clean +up the temporary checkout on exit. Previously, `--local` only worked with `path` inputs; git +inputs always required Fern's remote servers. + + ## 5.102.0 **`(feat):`** C++ library docs now render Doxygen groups (`@defgroup` / `@ingroup` / `@addtogroup`). Each group, including nested subgroups, gets a page under `groups/` that links to the diff --git a/fern/products/cli-api-reference/pages/docs-commands.mdx b/fern/products/cli-api-reference/pages/docs-commands.mdx index b07ca99822..93b5a36206 100644 --- a/fern/products/cli-api-reference/pages/docs-commands.mdx +++ b/fern/products/cli-api-reference/pages/docs-commands.mdx @@ -219,11 +219,11 @@ These commands build, preview, and publish a Fern documentation site, and valida ``` - For `git` inputs, the command sends the repository URL to Fern's servers for parsing. For `path` inputs, pass `--local` to parse the source on your machine instead. + By default, `git` inputs are sent to Fern's servers for parsing. Pass `--local` to parse the source on your machine instead, with either a `git` or a `path` input. ### local - Use `--local` to parse library source locally rather than on Fern's servers. Required when the library uses a `path` input. Local generation does not require authentication. + Use `--local` to parse library source locally rather than on Fern's servers. It works with both `path` and `git` inputs, and is required when the library uses a `path` input. With a `git` input, the CLI shallow-clones the repository at the configured `ref` (or the default branch), parses the `subpath` directory, and removes the temporary checkout when the process exits. Local generation does not require authentication. ```bash fern docs md generate --local diff --git a/fern/products/docs/pages/api-references/library-docs.mdx b/fern/products/docs/pages/api-references/library-docs.mdx index f45df7b373..080ad05a06 100644 --- a/fern/products/docs/pages/api-references/library-docs.mdx +++ b/fern/products/docs/pages/api-references/library-docs.mdx @@ -15,12 +15,12 @@ Cross-links are automatic. When a fully qualified identifier appears in a code b Add a `libraries` entry to your `docs.yml` file. Each library needs an `input` source, an `output.path` (where generated MDX files are written), and a `lang` (`python` or `cpp`). -The input source can be a `git` URL, parsed remotely on Fern's servers, or a local `path`, parsed on your machine with the `--local` flag. Local parsing is useful for iterating on documentation without pushing to a remote repository, and doesn't require you to be logged in to Fern. +The input source can be a `git` URL or a local `path`. A `git` URL is parsed remotely on Fern's servers unless you pass the `--local` flag; a `path` always requires `--local`. Local parsing is useful for iterating on documentation without pushing to a remote repository, and doesn't require you to be logged in to Fern. A `git` input reads the repository's default branch. Set `ref` to a branch or tag to generate from source that hasn't merged yet. - + ```yaml docs.yml libraries: plant-core: @@ -35,7 +35,7 @@ libraries: doxyfile: ./Doxyfile # optional, C++ only ``` - + ```yaml docs.yml libraries: plant-core: @@ -76,30 +76,34 @@ navigation: Run the [`fern docs md generate`](/learn/cli-api-reference/cli-reference/docs-commands#fern-docs-md-generate) command to generate MDX files from your library source code: - + ```bash fern docs md generate ``` -The command sends the repository URL to Fern's servers for parsing. +The command sends the repository URL to Fern's servers for parsing. Pass `--local` to parse the repository on your machine instead: + +```bash +fern docs md generate --local +``` + +The CLI performs a shallow clone of the repository at the configured `ref` (or the default branch), mounts the `subpath` directory for parsing, and removes the temporary checkout when the process exits. Nothing is sent to Fern's servers. - + ```bash fern docs md generate --local ``` The `--local` flag parses the source on your machine instead of on Fern's servers. - -Local parsing runs each parser inside a Docker container, so [Docker](https://docs.docker.com/get-docker/) must be running on your machine. Verify with `docker ps`. - - For C++ libraries, the parser uses your `path` directory as the source root. If your Doxyfile sets its input directive to subdirectories, the effective scope is your `path` combined with those Doxyfile input entries. Ensure the Doxyfile's input paths are relative to the root of your `path` directory. +Local parsing runs each parser inside a Docker container, so [Docker](https://docs.docker.com/get-docker/) must be running on your machine. Verify with `docker ps`. + 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. @@ -183,19 +187,19 @@ You can also edit page content by modifying the MDX files directly — generated ## Configuration reference - GitHub URL of the repository containing the library source code. Parsed remotely on Fern's servers. Mutually exclusive with `input.path`. + GitHub URL of the repository containing the library source code. Parsed remotely on Fern's servers, or cloned and parsed on your machine when you pass `--local`. Mutually exclusive with `input.path`. - Path within the repository to the library source. Only valid with `input.git`. Useful for monorepos. + Path within the repository to the library source. Only valid with `input.git`. Useful for monorepos. Respected by both remote and local generation. - Git ref to check out: a branch or tag. Only valid with `input.git`. Defaults to the repository's default branch. + Git ref to check out: a branch or tag. Only valid with `input.git`. Defaults to the repository's default branch. Respected by both remote and local generation. - Local filesystem path to the library source, relative to the `fern/` directory. Requires `--local` flag. Mutually exclusive with `input.git`. + Local filesystem path to the library source, relative to the `fern/` directory. Requires the `--local` flag. diff --git a/fern/products/docs/pages/changelog/2026-08-24.mdx b/fern/products/docs/pages/changelog/2026-08-24.mdx new file mode 100644 index 0000000000..1366627bd0 --- /dev/null +++ b/fern/products/docs/pages/changelog/2026-08-24.mdx @@ -0,0 +1,11 @@ +## Local generation now supports git inputs + +api-reference, docs.yml + +`fern docs md generate --local` now works with `git` [library inputs](/learn/docs/api-references/library-reference), not just local `path` inputs. The CLI shallow-clones the repository on your machine, respecting the configured `ref` and `subpath`, runs the parser in Docker, and cleans up the temporary checkout automatically. No data is sent to Fern's servers. + +```bash +fern docs md generate --local +``` + + From 5bb6fda72f140588c510850e4428eb5f755dde42 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 21:50:52 +0000 Subject: [PATCH 2/3] Document git input support for `fern docs md generate --local` --- fern/products/docs/pages/api-references/library-docs.mdx | 2 +- fern/products/docs/pages/changelog/2026-08-24.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fern/products/docs/pages/api-references/library-docs.mdx b/fern/products/docs/pages/api-references/library-docs.mdx index 080ad05a06..55f7de5b1f 100644 --- a/fern/products/docs/pages/api-references/library-docs.mdx +++ b/fern/products/docs/pages/api-references/library-docs.mdx @@ -212,4 +212,4 @@ You can also edit page content by modifying the MDX files directly — generated Path to a custom [Doxyfile](https://www.doxygen.nl/manual/config.html). C++ only. For local generation, the Doxyfile's input paths are resolved relative to the `input.path` directory. - + \ No newline at end of file diff --git a/fern/products/docs/pages/changelog/2026-08-24.mdx b/fern/products/docs/pages/changelog/2026-08-24.mdx index 1366627bd0..46a4014d7e 100644 --- a/fern/products/docs/pages/changelog/2026-08-24.mdx +++ b/fern/products/docs/pages/changelog/2026-08-24.mdx @@ -8,4 +8,4 @@ fern docs md generate --local ``` - + \ No newline at end of file From 1cb777b624a025e23fd93d3e6474e943a62a035b Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 23:27:45 +0000 Subject: [PATCH 3/3] Delete CLI changelog entry for 2026-08-24 --- .../cli-changelog/2026-08-24.mdx | 25 ------------------- 1 file changed, 25 deletions(-) delete mode 100644 fern/products/cli-api-reference/cli-changelog/2026-08-24.mdx diff --git a/fern/products/cli-api-reference/cli-changelog/2026-08-24.mdx b/fern/products/cli-api-reference/cli-changelog/2026-08-24.mdx deleted file mode 100644 index 4e760db410..0000000000 --- a/fern/products/cli-api-reference/cli-changelog/2026-08-24.mdx +++ /dev/null @@ -1,25 +0,0 @@ -## 5.103.0 -**`(feat):`** `fern docs md generate --local` now resolves library documentation inputs from git -repositories. Pass `--local` with a `git` input to have the CLI shallow-clone the repository -on your machine (respecting `ref` and `subpath`), run the parser in Docker locally, and clean -up the temporary checkout on exit. Previously, `--local` only worked with `path` inputs; git -inputs always required Fern's remote servers. - - -## 5.102.0 -**`(feat):`** C++ library docs now render Doxygen groups (`@defgroup` / `@ingroup` / `@addtogroup`). -Each group, including nested subgroups, gets a page under `groups/` that links to the -generated symbol pages, so a library's authored organization shows up in the navigation. - - -## 5.101.2 -**`(fix):`** Fill in path parameters that a user-specified example omits, using the same values example -autogeneration produces (or the parameter's client default). Previously such an example -generated snippets that omitted a required argument or passed `undefined`, and an example URL -containing `undefined`. - - -## 5.101.1 -**`(fix):`** Make global theme asset paths stable across publishes of the same organization and theme. - -