For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quickstart

Build an integration with GitBook’s developer platform in minutes

GitBook’s developer platform allows you to build integrations that seamlessly connect GitBook to internal tools, third‑party services, custom workflows and more.

1

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.

2

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.

3

Install the GitBook CLI

The GitBook 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
4

Create your integration

You can bootstrap your first integration by running the following command in your terminal:

gitbook integrations new

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

After bootstrapping your integration, you’re ready to open your integration in an IDE and start building.

5

Develop your integration 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:

If you use an AI coding assistant, add GitBook’s build-integration skill. It gives your assistant integration-specific guidance.

  1. In your integration repository’s root directory, run:

npx skills add GitBookIO/gitbook-skills
  1. Start a new agent session after the installation completes.

  2. Ask your assistant to read the build-integration skill before building your integration.

gitbook integrations publish

This will publish your integration to GitBook, and return a link with which you can install your integration. After installing your integration into your organization, space, or site, you can then run the development command to work on your integration locally.

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

gitbook integrations dev

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.

6

Install and use your integration

Once you’re ready to start using your integration in GitBook, you’ll need to install your integration into a space or site.

You can find your integration’s install link returned in your terminal after publishing your integration with the gitbook integrations publish command.

Continue building your integration

Continue with one of these integration guides:

Explore the integration platform

sliders

Configure your integration

Define your integration’s metadata, scopes, blocks, and settings.

Last updated

Was this helpful?

Powered by GitBook