The Fern CLI lets you initialize projects, validate API definitions, preview changes locally, and publish documentation and SDKs. This page covers installation and common commands to get you started.
The Fern CLI requires Node.js version 22 or higher and npm version 10.0.0 or higher (ships with Node.js 22).
If your version is below the minimum, download the latest Node.js LTS which includes a compatible npm version.
If you prefer to manage Fern as a project dependency or are working in an environment with limited internet connectivity, install the CLI locally:
In your fern.config.json, set the version to * to use your locally installed version:
See the fern.config.json reference for more details.
The Fern CLI manages both documentation and SDK workflows. Below is a brief overview of the common commands for each. All commands support global options like --log-level for debugging.
For complete CLI documentation, see the command reference.
When working with Fern Docs, you’ll use these CLI commands. For complete instructions, see the Docs quickstart.
When working with Fern SDKs, you’ll use these CLI commands. For complete instructions, see the SDKs quickstart.