Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions fern/products/cli-api-reference/cli-changelog/2026-08-24.mdx

This file was deleted.

4 changes: 2 additions & 2 deletions fern/products/cli-api-reference/pages/docs-commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,11 @@ These commands build, preview, and publish a Fern documentation site, and valida
```
</CodeBlock>

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
Expand Down
34 changes: 19 additions & 15 deletions fern/products/docs/pages/api-references/library-docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<Tabs>
<Tab title="git input (remote)">
<Tab title="git input">
```yaml docs.yml
libraries:
plant-core:
Expand All @@ -35,7 +35,7 @@ libraries:
doxyfile: ./Doxyfile # optional, C++ only
```
</Tab>
<Tab title="path input (local)">
<Tab title="path input">
```yaml docs.yml
libraries:
plant-core:
Expand Down Expand Up @@ -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:

<Tabs>
<Tab title="git input (remote)">
<Tab title="git input">
```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.
</Tab>
<Tab title="path input (local)">
<Tab title="path input">
```bash
fern docs md generate --local
```

The `--local` flag parses the source on your machine instead of on Fern's servers.

<Warning>
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`.
</Warning>

<Note>
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.
</Note>
</Tab>
</Tabs>

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`.

<Tip>
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.
</Tip>
Expand Down Expand Up @@ -183,19 +187,19 @@ You can also edit page content by modifying the MDX files directly — generated
## Configuration reference

<ParamField path="input.git" type="string">
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`.
</ParamField>

<ParamField path="input.subpath" type="string">
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.
</ParamField>

<ParamField path="input.ref" type="string">
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.
</ParamField>

<ParamField path="input.path" type="string">
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.
</ParamField>

<ParamField path="output.path" type="string" required={true}>
Expand All @@ -208,4 +212,4 @@ You can also edit page content by modifying the MDX files directly — generated

<ParamField path="config.doxyfile" type="string">
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.
</ParamField>
</ParamField>
11 changes: 11 additions & 0 deletions fern/products/docs/pages/changelog/2026-08-24.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Local generation now supports git inputs

<ChangelogTags>api-reference, docs.yml</ChangelogTags>

`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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <FernStyles.Hedges> reported by reviewdog 🐶
Avoid hedge words and filler like 'just'. Prefer direct statements.


```bash
fern docs md generate --local
```

<Button intent="none" outlined rightIcon="arrow-right" href="/learn/docs/api-references/library-reference">Read the docs</Button>