Fern

Open source

Fern turns an OpenAPI or other API definition into client SDKs in several languages and a hosted documentation site.

Open-source alternative to

buildwithfern.com
Fern homepage screenshot
GitHub stars
3.8k
Last 30 days
+24(+1%)
Last commit
today
Repository age
4 years
Version
5.23.3
Licence
Apache-2.0
Self-hosted
Yes

About Fern

Fern takes an API definition as input and produces type-safe SDKs and developer documentation from it. The specifications named in the README are OpenAPI (REST and webhooks), AsyncAPI (WebSockets), Protobuf (gRPC) and OpenRPC. SDK generators are listed for TypeScript, Python, Java, Ruby, Go, C#, PHP, Swift and Rust, and a separate generator produces a standalone command-line interface for an API.

Work happens through a command-line tool installed with npm, which needs Node 18 or newer. A project keeps a fern folder holding fern.config.json, generators.yml and the API definition. The command fern init starts from an OpenAPI file, fern generate runs the generators, fern check validates the definition and fern add brings in another generator. In the README example the TypeScript SDK lands under generated/sdks/typescript.

For documentation, Fern builds and hosts a site with an auto-generated API reference. Pages are Markdown (MDX) files kept in git, and a docs.yml file controls navigation, theme and hosting. The site includes search and dark mode, and colours, font, logo and domain can be changed. The vendor's own site also describes a browser-based visual editor and an MCP server so coding agents can propose doc changes.

The GitHub repository carries a warning that the open-source project is no longer maintained and sends readers to buildwithfern.com for the current SDK, CLI, MCP and docs generation. The code is TypeScript under the Apache 2.0 licence.

Key features

  • Generates type-safe SDKs in several languages
  • Builds and hosts an API reference site
  • Reads OpenAPI, AsyncAPI, Protobuf and OpenRPC definitions
  • Doc pages are Markdown versioned with git
  • Produces a standalone CLI for an API
  • Can export an OpenAPI spec through a generator
  • Serves llms.txt for coding agents

Good fit for

  • Generate client SDKs from an OpenAPI file
  • Publish a versioned API reference site
  • Produce a command-line client for an API
Tags
openapi
sdk-generator
api-docs
docs-as-code
cli
typescript

Fern: questions and answers

What is Fern used for?
Fern turns an OpenAPI or other API definition into client SDKs in several languages and a hosted documentation site. It is a good fit for generate client SDKs from an OpenAPI file, publish a versioned API reference site and produce a command-line client for an API.
Is Fern open source?
Yes. Fern is open source under the Apache-2.0 licence. Its source code is on GitHub at fern-api/fern and is written mainly in TypeScript.
Is Fern free?
Yes. Fern is open source, so the software itself is free to use. A managed cloud version is also available.
Can I self-host Fern?
Yes. Fern can be self-hosted on your own server or infrastructure.
What is Fern an alternative to?
Fern is an open-source alternative to APIMatic. Other open-source alternatives to APIMatic include Cortex Docs, Scalar and Mockoon.
Is Fern actively maintained?
Yes. The most recent commit to Fern was on 22 November 2026, and the latest release is 5.23.3, published on 12 May 2026. The project has 3.8k stars on GitHub, with 24 added in the last 30 days.

Open-source alternatives to Fern

See all

SaaS alternatives to Fern

See all