GitBook Agent is here! Introducing a new way to ideate, plan, and ship docs.
Find out more
LogoLogo
ProductPricingLog inSign up
  • Documentation
  • Developers
  • Guides
  • Changelog
  • Developer documentation
  • Build an integration
    • Quickstart
    • Install the CLI
      • CLI reference
    • Configure your integration
    • Develop your integration
      • ContentKit
        • Component reference
        • Markdown
      • Integration runtime
      • Client library
        • GitBook methods
    • Publish your integration
    • Submit your integration for review
    • Concepts
    • Guides
      • Create a custom unfurl action
      • Create interactive blocks
      • Receive webhook notifications
      • Work with HTTP requests
  • GitBook API
    • Quickstart
    • API reference
      • Organizations
        • Organization members
        • Organization invites
        • Organization AI ask
      • Docs sites
        • Site share links
        • Site structure
        • Site auth
        • Site preview
        • Site customization
        • Site spaces
        • Site sections
        • Site section groups
        • Site redirects
        • Site MCP servers
        • Site ads
        • Site users
        • Site insights
        • Site AI
        • Site AI ask
      • Collections
        • Collection users
        • Collection teams
      • Spaces
        • Space content
        • Space comments
        • Space embeds
        • Space users
        • Space teams
        • Space integrations
        • Git
      • Change requests
        • Change request content
        • Change request contributors
        • Change request reviewers
        • Change request comments
      • Translations
        • Glossary
      • Imports
      • Integrations
      • URLs
      • OpenAPI
        • OpenAPI spec versions
      • Conversations
      • Custom fonts
      • Subdomains
      • Users
      • Teams
        • Team members
      • SSO
      • Storage
      • Custom hostnames
      • System info
      • Download OpenAPI spec
    • Authentication
    • Rate limiting
    • Pagination
    • Errors
    • Concepts
    • Guides
      • Track advanced analytics with GitBook's Events Aggregation API
  • Resources
    • ContentKit playground
    • GitHub examples
Powered by GitBook
On this page
Edit on GitHub
  1. Build an integration

Develop your integration

Develop and test integrations locally on your machine

Last updated 1 month ago

Was this helpful?

LogoLogo

Resources

  • Showcase
  • Enterprise
  • Status

Company

  • Careers
  • Blog
  • Community

Policies

  • Subprocessors
  • Terms of Service
CtrlK

Was this helpful?

After , you can continue using the CLI to develop and test your app.

1

Publish your integration

Before you're able to develop your integration, you will first need to publish it. You can do this by running the following command in the root directory for your integration:

By default (defined in the CLI-generated gitbook-manifest.yaml), your integration will be published privately, and owned by the organization specified in the manifest.

After publishing your integration, the CLI will give you a link to install your integration into the organization you’ve set.

You need to install your app into at least 1 space or site in order to develop it locally.

2

Start your integration’s development server

While inside the root directory of your integration, run:

gitbook dev

This will start a development server tied to your organization.

Running this command will start a development server for use by the integration only. You do not need to navigate to the port the server is running on. All integration traffic will automatically be served from your local server instead of the published version.

3

Develop your integration

It's recommended that you disable browser caching for the most optimal experience when developing your app.

Any logs sent to the console or made through your integration's RuntimeContext will be surfaced in your browser's console.

Any UI changes made to your integration will need a browser refresh in order to be visible.

FAQ

Why don't I see any logs in my console?

Depending on where your console log is run in your integration, you may see it in your machine's console or your browser's console. Please check both to ensure your logs are working correctly.

I'm getting an error when visiting the URL listed in the console.

The URL provided in the console is used as a server for your integration. You do not need to visit this URL.

Instead, visit the GitBook space you provided in the dev command when starting your development server (i.e. app.gitbook.com/o/org_id/s/space_id).

bootstrapping your integration with the GitBook CLI
gitbook publish