1. Home
  2. Getting started

Setting up Fern in your repo

Install

In terminal, run

Initialize

In the root of your repo, run fern init. This will create the following folder structure in your project:

Defining your API

Your Fern Definition is a set of YAML files that are the single source of truth for your API. You check your Fern Definition into your repo, inside of which describes your API requests, responses, model, paths, methods, errors, and authentication scheme.

Check out an example Fern Definition on Github.

Already have OpenAPI description?

Use our openapi-to-fern converter

Send us an email to get started

Generate code

Fern’s code generators run remotely in the cloud. The input is your Fern Definition and the output is auto-generated code. You configure which generators you’re using in generators.yml.

Check out an example generators.yml on Github.

What’s next?