统计信息:字数 1570 阅读4分钟
The GitBook command line interface.
Install this globally and you'll have access to the gitbook command anywhere on your system.
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.
Run command gitbook build, gitbook serve (read GitBook documentation for details).
List all available commands using:
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:
and list available commands in this version using:
List installed versions:
List available versions on NPM:
Install a specific version:
Update to the latest version
Uninstall a specific version
Use a local folder as a GitBook version (for developement)