1. gitbook-cli
CLI to generate books and documentation using gitbook
gitbook-cli
Package: gitbook-cli
Created by: GitbookIO
Last modified: Mon, 13 Mar 2023 09:23:26 GMT
Version: 2.3.2
License: Apache-2.0
Downloads: 14,343
Repository: https://github.com/GitbookIO/gitbook-cli

Install

npm install gitbook-cli
yarn add gitbook-cli

gitbook-cli

NPM version
Linux Build Status
Windows Build status

The GitBook command line interface.

Install this globally and you'll have access to the gitbook command anywhere on your system.

$ npm install -g gitbook-cli

Note: The purpose of the gitbook command is to load and run the version of GitBook you have specified in your book (or the latest one), irrespective of its version. The GitBook CLI only support versions >=2.0.0 of GitBook.

gitbook-cli store GitBook's versions into ~/.gitbook, you can set the GITBOOK_DIR environment variable to use another directory.

How to install it?

$ npm install -g gitbook-cli

How to use it?

Run GitBook

Run command gitbook build, gitbook serve (read GitBook documentation for details).

List all available commands using:

$ gitbook help

Specify a specific version

By default, GitBook CLI will read the gitbook version to use from the book configuration, but you can force a specific version using --gitbook option:

$ gitbook build ./mybook --gitbook=2.0.1

and list available commands in this version using:

$ gitbook help --gitbook=2.0.1

Manage versions

List installed versions:

$ gitbook ls

List available versions on NPM:

$ gitbook ls-remote

Install a specific version:

$ gitbook fetch 2.1.0

# or a pre-release

$ gitbook fetch beta

Update to the latest version

$ gitbook update

Uninstall a specific version

$ gitbook uninstall 2.0.1

Use a local folder as a GitBook version (for developement)

$ gitbook alias ./mygitbook latest

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin