Explore how adaptive content transforms your docs into a dynamic, tailored experience for every user.
Read the docs
LogoLogo
ProductPricingLog inSign up
  • Documentation
  • Developers
  • Guides
  • Changelog
  • Help Center
  • Getting Started
    • Developer Documentation
    • Quickstart
    • Development
    • Publishing
  • Integrations
    • Introduction
    • Using the CLI
    • Configuration
    • ContentKit
      • Component reference
    • Integration runtime
  • Client library
  • Guides
    • Creating a custom unfurl action
    • Creating interactive blocks
    • Referencing your integration in Markdown
    • Working with HTTP requests
    • Using the CLI in CI/CD
  • GitBook API
    • Introduction
    • Authentication
    • 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 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
      • Integrations
      • URLs
      • OpenAPI
        • OpenAPI spec versions
      • Conversations
      • Custom fonts
      • Subdomains
      • Users
      • Teams
        • Team members
      • SSO
      • Storage
      • Custom hostnames
      • System info
    • Rate limiting
    • Pagination
    • Errors
  • Marketplace
    • Overview
    • Submit your app for review
  • Resources
    • Concepts
    • Changelog
    • ContentKit playground
    • GitHub examples
Powered by GitBook
On this page
Edit on GitHub
  1. Integrations

Using the CLI

Last updated 13 days ago

Was this helpful?

LogoLogo

Resources

  • Showcase
  • Enterprise
  • Status

Company

  • Careers
  • Blog
  • Community

Policies

  • Subprocessors
  • Terms of Service
CtrlK
  • gitbook auth
  • gitbook new <dir>
  • gitbook dev
  • gitbook publish
  • gitbook unpublish <integration-name>
  • gitbook whoami
  • gitbook help

Was this helpful?

The CLI can be used to create, test and publish integrations for GitBook’s integration platform. Get started by installing the CLI:

npm install @gitbook/cli -g

gitbook auth

Authenticate the CLI with a GitBook Developer API token. You can generate a personal developer token in your GitBook Developer settings.

The token can also be provided using the command line argument --token=<token>; If none is provided, it'll be prompted.

gitbook new <dir>

Create and initialize a new integration locally. The program will prompt for information about the integration.

gitbook dev

Create a live connection from your integration to your GitBook editor. Updates made locally while the connection is running will automatically be received in the editor.

See the development section to learn more.

gitbook publish

Publish the integration defined in the gitbook-manifest.yaml file. See the GitBook Manifest reference documentation to learn more.

See the publishing section to learn more about publishing your integration to GitBook.

gitbook unpublish <integration-name>

Unpublish your integration from the GitBook integration platform. Pass the name of the integration as an argument to the command.

gitbook whoami

Print information about the currently authenticated user.

gitbook help

View the GitBook CLI commands and information on using them.