Features

Automated publishing to registries

Pro Feature

This feature is only available on paid plans. Please schedule a demo or email us to get started.

Fern will automatically publish your SDKs to registries like NPM, PyPI, and Maven. This means that you can easily distribute your SDKs to your users without having to worry about the publishing process.

Step 1: Configure your output location

In your generators.yml you can specify which generators (e.g. Python, Go, TypeScript) you would like to subscribe to. To publish to a registry, you will need to specify the output location for the SDK.

1 groups:
2 ts-sdk:
3 - name: fernapi/fern-typescript-node-sdk
4 version: 0.13.0
5 config:
6 namespaceExport: Imdb
7 output:
8 location: npm
9 package-name: "@imdb/sdk"
10 token: ${ NPM_TOKEN } # must be present in the environment

Step 2: Run fern generate

Once you have configured your generators.yml, you can run fern generate to trigger the SDK generation process.

To control the version of your package specify the --version flag. For example, fern generate --version 1.0.0 would publish version 1.0.0.

Private registries

In some cases, you may want to publish your SDKs to a private registry. Fern hosts private registries for you at npm.buildwithfern.com, pypi.buildwithfern.com, maven.buildwithfern.com, etc. To use an internal registry, simply specify the url field in your generators.yml:

1 groups:
2 ts-sdk:
3 - name: fernapi/fern-typescript-node-sdk
4 version: 0.13.0
5 url: npm.buildwithfern.com
6 config:
7 namespaceExport: Imdb
8 output:
9 location: npm
10 package-name: "@imdb-fern/sdk"

To use a private registry, you will need to set the FERN_TOKEN environment variable.