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

## 1.6.0

**`(feat):`** Add `fern self-update` command to update the globally installed Fern CLI.
The command detects how the CLI was installed (npm, pnpm, yarn, bun, or brew) and runs the appropriate update command.
Supports updating to a specific version (e.g., `fern self-update 0.85.0`) or the latest version (e.g., `fern self-update`).
Includes `--dry-run` flag to preview the update command without executing it.

## 1.5.0

**`(feat):`** Add `fern downgrade <version>` command to set the CLI version in fern.config.json. This allows users to pin their project to a specific CLI version without running migrations.

## 1.4.0

**`(feat):`** Enable local generation with preview mode by removing incompatibility restriction and migrating github
operations handling from generator-cli to fern-cli.

## 1.3.1

**`(fix):`** Fix duplicate upgrade messages when one CLI version reruns another. The parent process now properly suppresses its upgrade nudge so only a single message is shown.

## 1.3.0

**`(fix):`** Made `fern upgrade` safer by running migrations before updating `fern.config.json`. If migrations fail, your config stays unchanged.

**`(feat):`** Added `--from` flag to `fern upgrade` to manually specify the version to migrate from when needed.

**`(fix):`** Improved `fern upgrade` reliability by automatically detecting and recovering from faulty CLI upgrades. When upgrading from a problematic CLI version, Fern now retrieves the correct previous version from git history to ensure migrations run properly.

## 1.3.0-rc2

**`(fix):`** Make sure `fern upgrade` with `--rc` follows the same migration logic as non-rc upgrades.

## 1.3.0-rc1

**`(fix):`** Make sure `fern upgrade` with `--rc` follows the same migration logic as non-rc upgrades.

## 1.3.0-rc0

**`(fix):`** Made `fern upgrade` safer by running migrations before updating `fern.config.json`. If migrations fail, your config stays unchanged.

**`(feat):`** Added `--from` flag to `fern upgrade` to manually specify the version to migrate from when needed.

**`(fix):`** Improved `fern upgrade` reliability by automatically detecting and recovering from faulty CLI upgrades. When upgrading from a problematic CLI version, Fern now retrieves the correct previous version from git history to ensure migrations run properly.