Quickstart

Get up and running with the developer platform in minutes.

Getting started

You’ll need a GitBook account to start using the developer platform. If you don’t already have an account, you can sign up for free here.

Create a personal access token

After creating a GitBook account, you'll be able to create a personal access token in your developer settings.

This token represents your user in GitBook, and allows you to make API calls, create integrations, and publish them to any GitBook spaces you're a part of to test them.

Once you have your personal access token, you'll want to understand the differences between the pieces of the GitBook Integrations Platform in order to start developing your first app.

Install the GitBook CLI

The GitBook Development CLI requires Node v18 or later. It can be installed from NPM using:

npm install @gitbook/cli -g

Authenticate with your account

Once you have the CLI installed, you can run the following command and authenticate yourself with your personal access token using the following command:

gitbook auth

Bootstrap your app

Bootstrap your first integration by running the following command:

gitbook new

The prompts will ask you for a name, title, organization, and scopes for your integration.

Develop your app locally

In order to develop your integration on your local machine, you’ll first need to publish your integration. In the root of your integration, run:

gitbook publish

This will publish your app to GitBook, and return a link with which you can install your integration. Install your integration into a space, and note the spaceId in the URL.

Return to your integration on your local machine, and in the root of the integration, run the following development command:

gitbook dev spaceId

Example: If your integration is installed in a space https://app.gitbook.com/o/1234/s/5678/, your spaceId would be 5678.

After running the development script, you’re ready to start building your integration! Any changes made in your local version of the integration will be sent to the space you have your integration installed in. You’ll also be able to see logs in your console where applicable.

Read more on development and publishing concepts:

Last updated

Was this helpful?