GitBook CLI

2.3.2 · abandoned · verified Wed Apr 22

gitbook-cli is a command-line interface tool designed to manage and execute local installations of the open-source GitBook static site generator. It enables users to build, serve, and manage various versions of the GitBook engine (specifically GitBook versions >=2.0.0), storing them in a dedicated directory (defaulting to `~/.gitbook`). The current stable version indicated is 2.3.2. This toolchain facilitated local documentation and book generation, abstracting away direct `gitbook` engine installations. However, the GitBook project has since pivoted to a SaaS-first platform, and this open-source CLI and its associated engine are no longer actively maintained, making it an abandoned project. Its primary differentiator was simplifying local GitBook engine management and execution.

Common errors

Warnings

Install

Quickstart

Installs the GitBook CLI globally, initializes a new book, builds and serves it, and demonstrates version management.

npm install -g gitbook-cli

mkdir my-book
cd my-book

# Initialize a new GitBook project
gitbook init

# Build the book
gitbook build

# Serve the book locally
gitbook serve

# List installed GitBook versions
gitbook ls

# Install a specific GitBook version
gitbook fetch 3.2.3

view raw JSON →