Getting Started

Generate your first SDK

Schedule a Demo

Generating SDKs often requires understanding the state of your OpenAPI spec as well as your specific requirements. For the ideal experience, we strongly recommend scheduling a demo or emailing us to get started.

If you’d rather get started immediately, you can use Fern’s CLI tool to generate your first SDK.

Install the Fern CLI

First, install the CLI tool by running the following command:

$npm install -g fern-api

Initialize the Fern Folder

Pass fern check

Run fern check to ensure that your API Definition is valid. If there are any errors, you will need to fix them before proceeding.

If you’re using an OpenAPI spec, check out all of our supported extensions.

Add the SDK Generator

Pro Features

By default, none of the pro features will be enabled.

You can now use the SDK in your application. Here’s an example of how you can use the SDK:

1fern add fern-typescript-node-sdk --group sdk

Run fern generate --group sdk

Next up, run the following command to generate the SDK:

$fern generate --group sdk

This will create a fern folder in your current directory with the Fern Definition. For example, if you’re generating a TypeScript SDK, the folder structure will look like this:

2 typescript/
3 src/
4 ├─ index.ts
5 ├─ Client.ts
6 └─ api
7 └─ errors
8 └─ serialization