跳到导航

Set up Fern with fern init

Run fern init with no flags in a terminal to start a setup wizard. It finds your API spec and coding agents, then checks your organization name, creates a docs site from Fern’s docs starter with your company’s logo and colors, adds Fern’s skills for your coding agent, creates a preview link, and generates your SDKs, asking before each step. Add --guest to try it without a Fern account.

developer-toolsai

Try Fern as a guest

You can now publish a docs site or generate an SDK without a Fern account. Add --guest to fern generate and the CLI publishes docs to a temporary temp-<id>.docs.buildwithfern.com site or downloads the SDK to your project. A coding agent handles every step and hands you the claim link.

To try it without installing anything, use the card on the guest mode page. Drop your own OpenAPI spec or add the Plant Store sample API, then publish a docs site, generate a TypeScript SDK, or both. Each build shows its log while it runs and ends with a claim link.

developer-toolsai

Sticky breadcrumbs and non-clickable section breadcrumbs

Two new breadcrumb settings under layout.breadcrumbs in docs.yml:

  • sticky pins the breadcrumb row below the header while the page scrolls (Fern CLI 5.206.0 or later).
  • disable-non-page-ancestors renders sections, API References, and API packages without an overview page as non-clickable text instead of linking to their first page (Fern CLI 5.219.0 or later).
navigationdocs.yml

Popular searches

You can now show your site’s most-searched queries when a reader opens the search box. Set popular-searches to true under settings.search in docs.yml, then publish with Fern CLI 5.218.1 or later. Only queries that return results for logged-out readers appear, so gated content isn’t suggested.

docs.yml
settings:
search:
popular-searches: true
searchdocs.yml

More CSS selectors for API Reference pages

API Reference pages have new stable CSS selectors, so you can style more of the page with custom CSS:

  • Section headings, the endpoint URL and its path parameters, and the Try it button
  • Code snippet headers, the response status code selector, and error rows
  • Enum values, union variant selectors, and property rows (.fern-api-property and .fern-api-property-header)
  • Webhook, WebSocket, GraphQL, and gRPC sections
api-referencecustomization

MCP sign-in on password, JWT, and OAuth sites

Readers can now sign in to your site’s MCP server from their MCP client through your site’s password, JWT, or OAuth login, instead of pasting a token. Signed-in clients get results for the pages the reader’s roles can access. Set mcp-auth to true under page-actions.options in docs.yml, then publish with Fern CLI 5.221.0 or later.

docs.yml
page-actions:
options:
mcp-auth: true
aisecuritydocs.yml

Scrolling header tabs

Header tabs that don’t fit in the header now scroll horizontally instead of overflowing. Scrollable edges fade out and show a chevron button that scrolls the row, and the active tab scrolls into view on page load. No configuration is needed.

Read the docs
navigation

Tab menus

You can now turn a header tab into a menu of other tabs. Add a tab-menu to the tab in docs.yml, then give each menu tab its own - tab: entry in navigation with a layout or variants.

  • Menu entries can be tabs, group entries with a header, or external links.
  • Long menus split into columns with tab-menu-column-height, or site-wide with layout.tab-menu.default-column-height.
  • Menus open on hover.
  • Tab variants lists also accept group entries and links.
navigationdocs.yml

Remote paths

You can now serve a path prefix on your Fern docs domain from another HTTPS service you run. List each prefix and its destination under remote-paths in docs.yml, and Fern reverse-proxies those requests while serving the rest of the site.

docs.yml
remote-paths:
- path: /ui
destination: https://portal.example.com/ui
docs.yml

Export your docs site from the CLI

You can now download a copy of your live docs site with fern docs export. Choose the format with --format:

  • html (default): the full static site, including each page’s Markdown copy, llms.txt, and assets. Serve it locally with npx serve <folder>.
  • md: each page’s Markdown and llms.txt.
  • pdf: one PDF of the site, with the same cover, table of contents, header, and footer options as the Dashboard export.
developer-tools

Move custom domains off Vercel

Fern Docs sites are now prebuilt as static pages and served from the edge, so pages load faster and a publish no longer slows your site down. Custom domains that still point to Vercel, Fern’s previous hosting, must point to cname.ferndocs.com by December 1, 2026. You can now make the switch from the Dashboard, and your docs stay live on the current setup until you change the DNS record.

dashboarddeveloper-tools

Real page titles for external sitemap results

Search results for pages indexed from experimental.external-sitemaps now show each page’s real title instead of one derived from its URL, so help center and community pages are findable by topic.

  • Fern’s crawler identifies itself as FernBot/1.0 (+https://buildwithfern.com) and follows robots.txt and Crawl-delay, so site owners can allow or restrict it.
  • URLs that carry their language in a query parameter such as lang, hl, or _LANG are routed to the matching site locale.
  • A temporarily unavailable sitemap no longer removes its pages from search.
search

Role-based access control in local preview

fern docs dev now applies role-based access control the same way a preview link does. Use the role selector to view the site as a specific viewer and check which pages and navigation items each role sees. Password protection also works locally when you set FERN_AUTH_TYPE=password and FERN_AUTH_SECRET before starting the server.

Read the docs
securitydeveloper-tools

Analytics consent

You can now keep PostHog analytics off until a visitor consents. Set settings.require-analytics-consent: true in docs.yml, then report consent from your consent manager’s callback (for example, Ketch or OneTrust) by setting window.fernAnalyticsConsent and dispatching a fern-analytics-consent event. Until consent is granted, Fern’s built-in PostHog analytics and your own PostHog instance load no scripts, set no cookies, and send no events. Revoking consent turns PostHog off and removes its cookies and storage keys.

integrationsdocs.yml

Choose the default version

You can now mark any entry in versions with default: true to make it the version served at your unversioned URLs, instead of relying on the first entry in the list. List order still sets the order of the version dropdown, so a preview or development version can appear first while a stable release keeps the canonical URLs, sitemap, and search. The flag also works in product versions.

navigation

Dynamic OG images on by default

Sites that set no site-wide og:image or twitter:image now get a generated preview image for every page, so links shared in Slack, X, and LinkedIn show a card image instead of a blank placeholder. Pages with their own og:image in frontmatter keep it. Set og:dynamic: false under metadata in docs.yml to opt out.

Read the docs
seo

Draggable Ask AI chat widget

Visitors can now move the standalone AskAiChat widget anywhere on the page. Drag the card by its header, or drag the launcher button itself and the card follows. The widget stays inside the viewport, and the card opens above or below the launcher depending on where there’s room. Dragging is on by default in @fern-api/search-widget 0.6.0; pass draggableCard={false} to keep the chat pinned to its placement corner.

aicomponents

Automation site scope and run history

Limit Fern Agent automations to specific docs sites to keep work within the intended sites and repositories. Select sites by their registered URL, such as portal.example.com/product-1, in the Docs sites field when creating or editing an automation, or name the sites in Fern Agent chat. Selecting All docs sites or leaving the selection empty includes every site in your organization.

ai

Sort endpoints by availability

You can now order endpoints in your API Reference by their availability with the sort-by-availability option. Listed values come first, in the order you provide, followed by any remaining values in the default order. Use unset to position endpoints that have no availability. Combine it with alphabetized: true to sort endpoints alphabetically within each availability.

api-referencedocs.yml

PHP filter for llms.txt and Markdown output

You can now pass lang=php to /llms.txt and to per-page .md and .mdx URLs to return only PHP SDK code examples. php joins node, python, java, ruby, go, csharp, and swift as accepted values for the lang query parameter.

Example
/llms.txt?lang=php
/plants/create-plant.md?lang=php
Read the docs
ai