gitmyhub

fern

TypeScript ★ 3.7k updated 44m ago

Input OpenAPI. Output SDKs and Docs.

Fern turns an OpenAPI file into ready-to-use SDKs in multiple programming languages plus a hosted API documentation website.

TypeScriptOpenAPIDockernpmsetup: easycomplexity 2/5

Fern is a platform that takes an API description file and automatically generates two things: software development kits (SDKs) in multiple programming languages, and a documentation website for developers. The idea is that if you have already described how your API works in a standard format like OpenAPI, Fern can do the tedious work of writing client libraries and reference docs for you.

An SDK is a pre-built package that other developers install to talk to your API without writing raw HTTP requests by hand. Fern can generate these in TypeScript, Python, Java, Go, Ruby, PHP, C#, Swift, and Rust. Each generated SDK is type-safe, meaning the programming language itself can catch mistakes before code even runs. Companies like ElevenLabs and LaunchDarkly use Fern to generate their public developer documentation.

The documentation output is a hosted website with an interactive API reference, search, dark mode, and SEO support built in. You can add extra pages written in Markdown and version the whole thing through Git. Color schemes, logos, fonts, and custom domain names are configurable.

To use Fern, you install its command-line tool via npm, point it at your existing OpenAPI file, and run a generate command. It handles the rest in the cloud. There is also an option to run generation locally using Docker if you prefer not to send your API definition to an external service.

Fern was backed by Y Combinator in 2023 and is open-source under an Apache 2.0 license. The repository is the main codebase for the CLI tool and all the individual SDK generators.

If you are a founder or PM evaluating this tool: Fern is aimed at API companies that want to give their customers polished, multi-language SDKs and clean documentation without manually writing and maintaining all of that code themselves.

Where it fits