
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
@mathisgd/gitbook-cli
Advanced tools
CLI to generate books and documentation using gitbook
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.
$ npm install -g gitbook-cli
Run command gitbook build, gitbook serve (read GitBook documentation for details).
List all available commands using:
$ gitbook help
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
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
FAQs
CLI to generate books and documentation using gitbook
The npm package @mathisgd/gitbook-cli receives a total of 0 weekly downloads. As such, @mathisgd/gitbook-cli popularity was classified as not popular.
We found that @mathisgd/gitbook-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.