> This page is for CLI 参考.

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

## 5.146.2

**`(fix):`** Fix `fern generate --docs` corrupting MDX pages that mix JSX image expressions like
`icon={<img src="..." />}` with other components that have local image paths. Text after
those components (such as a closing `</Tab>`) was deleted, so the page failed to compile and
rendered as raw text.

**`(fix):`** Fix local images inside Markdown link text, like `[Docs <img src="./icon.svg" />](https://...)`
or `[![badge](./badge.png)](https://...)`, being published with the build machine's absolute
path instead of the uploaded file. Finding images to upload no longer parses each page as full
MDX, which makes `fern generate --docs` faster on large sites.

## 5.146.1

**`(fix):`** Support building package artifacts from SDKs generated through SDK Gen API with `fern generate --package`, including pnpm-based TypeScript projects.

## 5.146.0

**`(feat):`** SDK variables can now declare an environment variable fallback. In `api.yml`, use the
detailed form `variables: { myVar: { type: string, env: MY_VAR } }`; in OpenAPI, add
`x-fern-env: MY_VAR` to an `x-fern-sdk-variables` entry. The value is emitted as
`VariableDeclaration.envVar` in the IR so generators can make the variable optional at
client construction and read it from the environment when it is not passed explicitly.

## 5.145.2

**`(fix):`** `fern org get` now names the org, shows when the CLI version policy was last updated, and shows
the running CLI version (e.g. `Org "acme" requires Fern CLI >= 5.106.0 (updated 2026-08-26).
You're on 5.140.2.`), so the output no longer reads like an error.

**`(fix):`** `fern upgrade` no longer warns that the running CLI is outside the org's version policy ("Version
redirection is disabled, so it was not upgraded"), since the upgrade itself moves the project
to a new version.

## 5.145.1

**`(fix):`** `fern docs dev` no longer reports a false `api-section-has-definition` error for every `api:`
navigation item. The dev server validates docs without loading API workspaces, so the check
is now skipped there; `fern check` and `fern generate --docs` still run it.

**`(fix):`** Upgrade to SDK Config 0.6 and omit defaulted optional fields from SDK Config payloads sent to local and remote generators.

## 5.145.0

**`(feat):`** `fern export` now accepts a repeatable `--audience` flag. When set, the exported OpenAPI spec only
includes the endpoints, webhooks, environments, and schemas required for those audiences
(e.g. `fern export openapi.yml --audience public`).