GitPedia

Fern

Input OpenAPI. Output SDKs and Docs.

From fern-apiยทUpdated June 15, 2026ยทView on GitHubยท

Fern is a platform that transforms your API definitions into production-ready SDKs and beautiful documentation in minutes. The project is written primarily in TypeScript, distributed under the Apache License 2.0 license, first published in 2022. It has gained significant community traction with 3,669 stars and 323 forks on GitHub. Key topics include: api, docs-as-code, docs-generator, openapi, sdk-generator.

Latest release: 5.23.3
<br/> <div align="center"> <a href="https://www.buildwithfern.com/?utm_source=github&utm_medium=readme&utm_campaign=fern&utm_content=logo"> <picture> <source media="(prefers-color-scheme: dark)" srcset="/fern/images/logo-white.svg"> <source media="(prefers-color-scheme: light)" srcset="/fern/images/logo-primary.svg"> <img alt="logo" src="/fern/images/logo-primary.svg" height="80" align="center"> </picture> </a> <br/> <br/>

npm version
2023 Y Combinator Startup
License

Documentation
Book a demo
Start for free

</div>

๐ŸŒฟ What is Fern?

Fern is a platform that transforms your API definitions into production-ready SDKs and beautiful documentation in minutes.

With Fern, you can offer your users:

  • ๐Ÿงฉ Type-safe SDKs in multiple languages, including TypeScript, Python, Java, Go, Ruby, PHP, and C#
  • ๐Ÿ“˜ Developer documentation featuring an interactive UI and auto-generated API + SDK references
  • โœจ AI Search powered by an assistant trained on your docs, APIs, and SDKs that can instantly answer a developer's questions

Fern supports leading API specifications including OpenAPI (REST, Webhooks), AsyncAPI (WebSockets), Protobuf (gRPC), and OpenRPC.

<div align="center"> <a href="/fern/images/overview-dark.png" target="_blank"> <picture> <source srcset="/fern/images/overview-dark.png" media="(prefers-color-scheme: dark)"> <source srcset="/fern/images/overview-light.png" media="(prefers-color-scheme: light)"> <img src="/fern/images/overview-light.png" width="700" alt="Overview Diagram"> </picture> </a> </div>

๐ŸŒฟ SDKs

The Fern platform is available via a command line interface (CLI) and requires Node 18+. To install it, run:

bash
npm install -g fern-api

Initialize Fern with your OpenAPI spec:

bash
fern init --openapi ./path/to/openapi.yml # or fern init --openapi https://link.buildwithfern.com/plantstore-openapi

Your directory should look like the following:

yaml
fern/ โ”œโ”€ fern.config.json โ”œโ”€ generators.yml # generators you're using โ””โ”€ openapi/ โ””โ”€ openapi.json # your openapi document

Finally, to invoke the generator, run:

bash
fern generate

๐ŸŽ‰ Once the command completes, you'll see your SDK in /generated/sdks/typescript.

๐ŸŒฟ API Documentation

Fern can also build and host a documentation website with an auto-generated API reference. Write additional pages in markdown and have them versioned with git.
Search, SEO, dark mode, and popular components are provided out-of-the-box. Plus, you can customize the colors, font, logo, and domain name.

Check out docs built with Fern:

Get started here.

๐ŸŒฟ Generators

Generators are processes that take your API Definition as input and output artifacts (SDKs, Server boilerplate, etc.). To add a generator, run fern add <generator id>.

SDK Generators

Generator IDLatest VersionChangelog
fernapi/fern-typescript-sdkTypescript Generator VersionChangelog
fernapi/fern-python-sdkPython Generator VersionChangelog
fernapi/fern-java-sdkJava Generator VersionChangelog
fernapi/fern-ruby-sdkRuby Generator VersionChangelog
fernapi/fern-go-sdkGo Generator VersionChangelog
fernapi/fern-csharp-sdkC# Generator VersionChangelog
fernapi/fern-php-sdkPHP Generator VersionChangelog
fernapi/fern-swift-sdkSwift Generator VersionChangelog
fernapi/fern-rust-sdkRust Generator VersionChangelog

Spec Generators

Fern's spec generators can output an OpenAPI spec.

Note: The OpenAPI spec generator is primarily intended for Fern Definition users. This prevents lock-in so that one can always export to OpenAPI.

Generator IDLatest VersionChangelog
fernapi/fern-openapiOpenAPI Generator Versionversions.yml

๐ŸŒฟ CLI Commands

Here's a quick look at the most popular CLI commands. View the documentation for all CLI commands.

fern init: adds a new starter API to your repository.

fern check: validate your API definition and Fern configuration.

fern generate: run the generators specified in generators.yml in the cloud.

fern generate --local: run the generators specified in generators.yml in docker locally.

fern add <generator>: include a new generator in your generators.yml. For example, fern add fern-python-sdk.

Inspiration

Fern is inspired by internal tooling built to enhance the developer experience. We stand on the shoulders of giants. While teams were responsible for building the following tools, we want to give a shout out to Mark Elliot (creator of Conjure at Palantir), Michael Dowling (creator of Smithy at AWS), and Ian McCrystal (creator of Stripe Docs).

Community

Join our Slack! We are here to answer questions and help you get the most out of Fern.

Contributing

We welcome community contributions. For guidelines, refer to our CONTRIBUTING.md. To contribute to our documentation, refer to our docs repo.

Development Environment

This repository uses DevBox for reproducible development environments. DevBox provides cross-platform support (Mac, Linux, Windows via WSL) with exact version pinning based on Nix.

To get started:

bash
# Install DevBox (https://www.jetify.com/devbox/docs/installing_devbox/) curl -fsSL https://get.jetify.com/devbox | bash # Enter the development environment devbox shell

DevBox automatically installs all required dependencies including Node.js, pnpm, Go, Python, Poetry, JDK, and buf with pinned versions matching CI.

Fern Contributors

Contributors

Showing top 12 contributors by commit count.

View all contributors on GitHub โ†’

This article is auto-generated from fern-api/fern via the GitHub API.Last fetched: 6/15/2026