Fe

Fern, a language for defining REST APIs that compiles into OpenAPI

Hacker News

Fern, a language for defining REST APIs that compiles into OpenAPI

Hi HN, this is Danny, Deep, and Zach. We built Fern after our previous ed tech startup failed. We were frustrated with how much time we spent writing “API code” instead of working on the actual product. We tried to use OpenAPI but we were underwhelmed - the generated code wasn’t idiomatic and it still required manual work (custom templates, scripts, manually publishing SDKs to registries). The Fern compiler takes your API as input and invokes generators that output things like: SDKs, server code, a Postman collection, and an OpenAPI spec. Some technical highlights about the compiler + generators: - The compiler (available as a CLI) handles syntactic + semantic validation. It also includes a linter that encodes best practices. If your API Definition compiles, you can have high confidence that the SDKs will generate correctly. - After all the parsing and validation, the compiler outputs an intermediate representation that gets handed off to the generators. This prevents each generator from re-implementing the same parsing and validation logic. - Each generator is implemented in the language it is targeting - e.g. the Python generators are written in Python, the TypeScript generators are written in TS. It makes the SDKs more idiomatic because every programming language generally has the best tooling/libraries for generating code in itself. We also think it’ll make community involvement + contribution easier. - The generators can output the code to disk, but also push the code to a Github repo and publish the SDK directly to registries (e.g. npm, Maven). We are looking for devs to use Fern for API development. If you have any feedback about the process, compiler, or the generated code, we’d love to hear it. "Plant Store" example: https://github.com/fern-api/plantstore-api Generated repos: - https://github.com/fern-api/plantstore-node - https://github.com/fern-api/plantstore-java - https://github.com/fern-api/plantstore-postman - https://github.com/fern-api/plantstore-openapi

Share card

Actual performance

18points
7comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
83%83% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: code, apis, open · Missing: mac, agents, macos
68%68% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: ide, io · Missing: https docs, excited, just released
66%66% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
36%36% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
28%28% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
17%17% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Ru
Ruby on Roda – REST APIs with Roda and Sequel48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Ruby on Roda – REST APIs with Roda and Sequel

Hacker News1
Ex
Expressa – build REST apis without code56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Expressa – build REST apis without code

Hacker News8
Ea
Easily consume REST APIs with Go49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Easily consume REST APIs with Go

Hacker News51
Te
Testing REST, GraphQL APIs61%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Testing REST, GraphQL APIs

Hacker News14
Wu
WunderGraph – Aggregate REST and GraphQL APIs, Add AuthN/Z and Caching76%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

WunderGraph – Aggregate REST and GraphQL APIs, Add AuthN/Z and Caching

Hacker News9
Co
Codeless Tests for GraphQL and REST APIs59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Codeless Tests for GraphQL and REST APIs

Hacker News2
Isthmus
Isthmus48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Connecting REST APIs

Indie Hackers1apis
PS
PSX – Build fully typed REST APIs64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

PSX – Build fully typed REST APIs

Hacker News3
Us
Use REST APIs? Test them!44%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Use REST APIs? Test them!

Hacker News5
To
ToolMesh – turn all your REST APIs into MCP tools via declarative YAML36%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

ToolMesh – turn all your REST APIs into MCP tools via declarative YAML

Hacker News2