fern: Generate API SDKs and Documentation

fern: Generate API SDKs and Documentation

Summary

Fern turns API definitions into SDKs and developer documentation through a command-line workflow. It suits teams that want to publish client libraries and API references from OpenAPI and other supported specifications.

At a glance

Language
TypeScript
License
Apache-2.0
Stars
3.8k
Forks
358
Added to OSRepos
March 10, 2026
Last analyzed
October 3, 2026
View on GitHub

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Overview

Fern is a platform and CLI for transforming API definitions into generated SDKs and developer documentation. It aims to reduce the work of maintaining language-specific client libraries and API references separately from the API specification.

It supports OpenAPI, AsyncAPI, Protobuf, and OpenRPC inputs. Fern may fit teams that want a specification-driven workflow for publishing SDKs and docs; generated artifacts and hosted documentation are part of a broader platform, so teams should review its generation and hosting workflows against their needs.

Key Features

  • Generate type-safe SDKs for languages including TypeScript, Python, Java, Go, Ruby, PHP, C#, Swift, and Rust.
  • Accept API definitions in OpenAPI, AsyncAPI, Protobuf, and OpenRPC formats.
  • Provide a CLI for initializing projects, checking definitions, and running generation.
  • Generate API documentation and references, with support for additional Markdown pages.
  • Offer SDK, CLI, and OpenAPI spec generators.
  • Support an interactive documentation UI with search, versioning, dark mode, and customization options.
  • Include an AI Search feature described as answering developer questions using documentation, APIs, and SDKs.

Use Cases

  • API platform teams can generate and distribute client SDKs for customers across multiple programming languages.
  • Developer relations teams can keep API references connected to API definitions while adding hand-written guides in Markdown.
  • Teams maintaining REST, WebSocket, gRPC, or JSON-RPC APIs can use Fern to generate SDKs or documentation from supported specifications.
  • Organizations that already maintain OpenAPI definitions can evaluate Fern as a way to introduce SDK generation without replacing those definitions.

Project Facts

  • Language: TypeScript
  • License: Apache-2.0
  • Stars: 3.8k
  • Forks: 358
  • Topics: api, docs-as-code, docs-generator, openapi, sdk-generator
  • Archived: false

Getting Started

Install the CLI with Node 18 or later:

npm install -g fern-api

Initialize from an OpenAPI file with fern init --openapi ./path/to/openapi.yml, then run fern generate. See the README for configuration and additional commands.

Considerations

  • The CLI requires Node 18 or later.
  • Fern's generators cover multiple languages, but each generator is a separate component with its own versions and changelog. Check the relevant generator's support and release details before adopting it.
  • The README distinguishes local Docker-based generation for legacy generator groups from remote generation for SDK Config targets, so workflows may differ depending on configuration.
  • The repository describes hosted documentation and AI Search as platform capabilities; evaluate those offerings separately if you need them, rather than assuming they are provided solely by the CLI.

Source repository

Open the original repository on GitHub.

21 counted GitHub visits

View on GitHub

Related repositories

Similar repositories that may be relevant next.

OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️