Package Managers

Integrating npm

To authenticate and integrate npm within your TypeScript/JavaScript SDK, you’ll need to create an npm token and add it to your repository.

Creating an npm token

Log In

Log into npm.

Click on your profile picture and select Access Tokens.

Generate Token

Click on Generate New Token and select Classic Token. Name your token and select Automation as the token type. Once finished, click Generate Token.

Save your token

Be sure to save the generated token - it won’t be displayed after you leave the page.

Adding tokens to your GitHub repository

Using GitLab? Follow these steps.

Open Repository

Open your Fern repository in GitHub.

Click on the Settings tab in your repository. Then, under the Security section, open Secrets and variables > Actions.

You can also use the url<your-repo>/settings/secrets/actions.

Add Secret

Select New repository secret. Name your secret, add the corresponding token, and click Add secret.