{"id":13541706,"url":"https://github.com/fern-api/fern","last_synced_at":"2026-04-01T17:46:55.528Z","repository":{"id":36961589,"uuid":"476820102","full_name":"fern-api/fern","owner":"fern-api","description":"Input OpenAPI. Output SDKs and Docs.","archived":false,"fork":false,"pushed_at":"2026-03-06T03:41:34.000Z","size":2660402,"stargazers_count":3536,"open_issues_count":420,"forks_count":286,"subscribers_count":16,"default_branch":"main","last_synced_at":"2026-03-06T03:41:48.225Z","etag":null,"topics":["api","docs-as-code","docs-generator","openapi","sdk-generator"],"latest_commit_sha":null,"homepage":"https://buildwithfern.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fern-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-04-01T17:56:54.000Z","updated_at":"2026-03-06T03:25:06.000Z","dependencies_parsed_at":"2026-02-11T06:00:04.308Z","dependency_job_id":null,"html_url":"https://github.com/fern-api/fern","commit_stats":{"total_commits":6448,"total_committers":98,"mean_commits":65.79591836734694,"dds":0.6403535980148883,"last_synced_commit":"48260d97380245aa23ad1233be88174f6ae93ffa"},"previous_names":[],"tags_count":2257,"template":false,"template_full_name":null,"purl":"pkg:github/fern-api/fern","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fern-api%2Ffern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fern-api%2Ffern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fern-api%2Ffern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fern-api%2Ffern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fern-api","download_url":"https://codeload.github.com/fern-api/fern/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fern-api%2Ffern/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30413642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T00:40:14.898Z","status":"online","status_checked_at":"2026-03-12T02:00:07.260Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","docs-as-code","docs-generator","openapi","sdk-generator"],"created_at":"2024-08-01T10:00:54.716Z","updated_at":"2026-03-12T23:02:30.175Z","avatar_url":"https://github.com/fern-api.png","language":"TypeScript","readme":"\u003cbr/\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://www.buildwithfern.com/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=fern\u0026utm_content=logo\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"/fern/images/logo-white.svg\"\u003e\n      \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"/fern/images/logo-primary.svg\"\u003e\n      \u003cimg alt=\"logo\" src=\"/fern/images/logo-primary.svg\" height=\"80\" align=\"center\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003cbr/\u003e\n\n\u003cbr/\u003e\n\n[![2023 Y Combinator Startup](https://img.shields.io/badge/Y%20Combinator-2023-orange)](https://www.ycombinator.com/companies/fern)\n![License](https://img.shields.io/badge/license-Apache%202.0-blue)\n\n[![Slack](https://img.shields.io/badge/slack-pink.svg)](https://join.slack.com/t/fern-community/shared_invite/zt-2dpftfmif-MuAegl8AfP_PK8s2tx350Q)\n[![Documentation](https://img.shields.io/badge/Read%20our%20Documentation-black?logo=book)](https://buildwithfern.com/learn/home?utm_source=fern-api/fern/readme-read-our-documentation)\n\n\u003c/div\u003e\n\nFern is a toolkit that allows you to input your API Definition and output SDKs and API documentation. Fern is compatible with the OpenAPI specification (formerly Swagger).\n\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"/fern/images/overview-dark.png\" target=\"_blank\"\u003e\n        \u003cpicture\u003e\n            \u003csource srcset=\"/fern/images/overview-dark.png\" media=\"(prefers-color-scheme: dark)\"\u003e\n            \u003csource srcset=\"/fern/images/overview-light.png\" media=\"(prefers-color-scheme: light)\"\u003e\n            \u003cimg src=\"/fern/images/overview-light.png\" width=\"700\" alt=\"Overview Diagram\"\u003e\n        \u003c/picture\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\n## 🌿 SDKs\n\nThe Fern toolkit is available via a command line interface (CLI) and requires Node 18+. To install it, run:\n\n```bash\nnpm install -g fern-api\n```\n\nInitialize Fern with your OpenAPI spec:\n\n```bash\nfern init --openapi ./path/to/openapi.yml\n# or\nfern init --openapi https://link.buildwithfern.com/plantstore-openapi\n```\n\nYour directory should look like the following:\n\n```yaml\nfern/\n├─ fern.config.json\n├─ generators.yml # generators you're using\n└─ openapi/\n  └─ openapi.json # your openapi document\n```\n\nFinally, to invoke the generator, run:\n\n```bash\nfern generate\n```\n\n🎉 Once the command completes, you'll see your SDK in `/generated/sdks/typescript`.\n\n## 🌿 API Documentation\n\nFern 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.\n\nCheck out docs built with Fern:\n\n- [docs.vellum.ai](https://docs.vellum.ai)\n- [docs.superagent.sh](https://docs.superagent.sh/)\n- [docs.hume.ai](https://docs.hume.ai/)\n\nGet started [here](https://github.com/fern-api/docs-starter-openapi).\n\n## 🌿 Generators\n\nGenerators are process that take your API Definition as input and output artifacts (SDKs,\nPostman Collections, Server boilerplate, etc.). To add a generator run `fern add \u003cgenerator id\u003e`\n\n### SDK Generators\n\n| Generator ID                       | Latest Version                                                                                    | Entrypoint                                                                    |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |\n| `fernapi/fern-typescript-node-sdk` | ![Typescript Generator Version](https://img.shields.io/docker/v/fernapi/fern-typescript-node-sdk) | [cli.ts](./generators/typescript/sdk/cli/src/nodeCli.ts)                      |\n| `fernapi/fern-python-sdk`          | ![Python Generator Version](https://img.shields.io/docker/v/fernapi/fern-python-sdk)              | [cli.py](./generators/python/src/fern_python/generators/sdk/cli.py)           |\n| `fernapi/fern-java-sdk`            | ![Java Generator Version](https://img.shields.io/docker/v/fernapi/fern-java-sdk)                  | [Cli.java](./generators/java/sdk/src/main/java/com/fern/java/client/Cli.java) |\n| `fernapi/fern-ruby-sdk`            | ![Ruby Generator Version](https://img.shields.io/docker/v/fernapi/fern-ruby-sdk)                  | [cli.ts](./generators/ruby/sdk/src/cli.ts)                                    |\n| `fernapi/fern-go-sdk`              | ![Go Generator Version](https://img.shields.io/docker/v/fernapi/fern-go-sdk)                      | [main.go](./generators/go/cmd/fern-go-sdk/main.go)                            |\n| `fernapi/fern-csharp-sdk`          | ![C# Generator Version](https://img.shields.io/docker/v/fernapi/fern-csharp-sdk)                  | [cli.ts](./generators/csharp/sdk/src/cli.ts)                                  |\n| `fernapi/fern-php-sdk`             | ![PHP Generator Version](https://img.shields.io/docker/v/fernapi/fern-php-sdk)                    | [cli.ts](./generators/php/sdk/src/cli.ts)                                     |\n\n### Server-side Generators\n\nFern's server-side generators output boilerplate application code (models and networking logic). This is intended for spec-first or API-first developers, who write their API definition (as an OpenAPI spec or Fern definition) and want to generate backend code.\n\n| Generator ID                      | Latest Version                                                                                                  | Entrypoint                                                                       |\n| --------------------------------- | --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |\n| `fernapi/fern-typescript-express` | ![Typescript Express Server Generator Version](https://img.shields.io/docker/v/fernapi/fern-typescript-express) | [cli.ts](./generators/typescript/express/cli/src/cli.ts)                         |\n| `fernapi/fern-fastapi-server`     | ![Python FastAPI Server Generator Version](https://img.shields.io/docker/v/fernapi/fern-fastapi-server)         | [cli.py](./generators/python/src/fern_python/generators/sdk/cli.py)              |\n| `fernapi/fern-java-spring`        | ![Java Spring Server Generator Version](https://img.shields.io/docker/v/fernapi/fern-java-spring)               | [Cli.java](./generators/java/spring/src/main/java/com/fern/java/spring/Cli.java) |\n\n### Model Generators\n\nFern's model generators will output schemas or types defined in your OpenAPI spec or Fern Definition.\n\n| Generator ID                  | Latest Version                                                                                   | Entrypoint                                                                    |\n| ----------------------------- | ------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------- |\n| `fernapi/fern-pydantic-model` | ![Pydantic Model Generator Version](https://img.shields.io/docker/v/fernapi/fern-pydantic-model) | [cli.py](./generators/python/src/fern_python/generators/sdk/cli.py)           |\n| `fernapi/java-model`          | ![Java Model Generator Version](https://img.shields.io/docker/v/fernapi/java-model)              | [Cli.java](./generators/java/sdk/src/main/java/com/fern/java/client/Cli.java) |\n| `fernapi/fern-ruby-model`     | ![Ruby Model Generator Version](https://img.shields.io/docker/v/fernapi/fern-ruby-model)         | [cli.ts](./generators/ruby/model/src/cli.ts)                                  |\n| `fernapi/fern-go-model`       | ![Go Model Generator Version](https://img.shields.io/docker/v/fernapi/fern-go-model)             | [main.go](./generators/go/cmd/fern-go-model/main.go)                          |\n\n### Spec Generators\n\nFern's spec generators can output an OpenAPI spec or a Postman collection.\n\n\u003e **Note**: The OpenAPI spec generator is primarily intended for Fern Definition users. This prevents lock-in so that one can always export to OpenAPI.\n\n| Generator ID           | Latest Version                                                                     | Entrypoint                                |\n| ---------------------- | ---------------------------------------------------------------------------------- | ----------------------------------------- |\n| `fernapi/fern-openapi` | ![OpenAPI Generator Version](https://img.shields.io/docker/v/fernapi/fern-openapi) | [cli.ts](./generators/openapi/src/cli.ts) |\n| `fernapi/fern-postman` | ![Postman Generator Version](https://img.shields.io/docker/v/fernapi/fern-postman) | [cli.ts](./generators/postman/src/cli.ts) |\n\n## 🌿 CLI Commands\n\nHere's a quick look at the most popular CLI commands. View the documentation for [all CLI commands](https://buildwithfern.com/learn/cli-api/cli-reference/commands).\n\n`fern init`: adds a new starter API to your repository.\n\n`fern check`: validate your API definition and Fern configuration.\n\n`fern generate`: run the generators specified in `generators.yml` in the cloud.\n\n`fern generate --local`: run the generators specified in `generators.yml` in docker locally.\n\n`fern add \u003cgenerator\u003e`: include a new generator in your `generators.yml`. For example, `fern add fern-python-sdk`.\n\n## Advanced\n\n### API First\n\nFern supports developers and teams that want to be API-first or Spec-first.\n\nDefine your API, and use Fern to generate models, networking code and boilerplate application code. The generated code adds\ntype safety to your API implementation - if your backend doesn't implement the API correctly, it won't compile.\n\nFrameworks currently supported:\n\n- [Express](./generators/typescript)\n- [Spring Boot](./generators/java)\n- [FastAPI](./generators/python)\n\n### Fern Definition\n\nWhile we are big fans of OpenAPI, we know it isn't the _easiest_ format to read and write. If you're looking for an alternative,\ngive the Fern Definition a try.\n\nInstall the Fern CLI and initialize a Fern Project.\n\n```bash\nnpm install -g fern-api\nfern init\n```\n\nThis will create the following folder structure in your project:\n\n```yaml\nfern/\n├─ fern.config.json # root-level configuration\n├─ generators.yml # generators you're using\n└─ definition/\n  ├─ api.yml  # API-level configuration\n  └─ imdb.yml # endpoints, types, and errors\n```\n\nHere's what the `imdb.yml` starter file looks like:\n\n```yaml\ntypes:\n  MovieId: string\n\n  Movie:\n    properties:\n      id: MovieId\n      title: string\n      rating:\n        type: double\n        docs: The rating scale is one to five stars\n\n  CreateMovieRequest:\n    properties:\n      title: string\n      rating: double\n\nservice:\n  auth: false\n  base-path: /movies\n  endpoints:\n    createMovie:\n      docs: Add a movie to the database\n      method: POST\n      path: /create-movie\n      request: CreateMovieRequest\n      response: MovieId\n\n    getMovie:\n      method: GET\n      path: /{movieId}\n      path-parameters:\n        movieId: MovieId\n      response: Movie\n      errors:\n        - MovieDoesNotExistError\n\nerrors:\n  MovieDoesNotExistError:\n    status-code: 404\n    type: MovieId\n```\n\nCheckout open source projects that are using Fern Definitions:\n\n- [Metriport](https://github.com/metriport/metriport/tree/develop/fern/definition)\n- [Rivet](https://github.com/rivet-gg/rivet/tree/main/fern/definition)\n\n## Inspiration\n\nFern 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).\n\n## Community\n\n[Join our Discord!](https://discord.com/invite/JkkXumPzcG) We are here to answer questions and help you get the most out of Fern.\n\n## Contributing\n\nWe welcome community contributions. For guidelines, refer to our [CONTRIBUTING.md](/CONTRIBUTING.md).\n\n![Fern Contributors](https://contrib.rocks/image?repo=fern-api/fern)\n","funding_links":[],"categories":["TypeScript","api","Documentation Types"],"sub_categories":["API Documentation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffern-api%2Ffern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffern-api%2Ffern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffern-api%2Ffern/lists"}