mdBook/book-example/src/cli/cli-tool.md

22 lines
836 B
Markdown
Raw Normal View History

# Command Line Tool
2015-09-25 04:19:14 +08:00
mdBook can be used either as a command line tool or a [Rust crate](https://crates.io/crates/mdbook).
Let's focus on the command line tool capabilities first.
2015-09-25 04:19:14 +08:00
## Install
At the moment, the only way to install mdBook is by downloading the source code from Github and building it yourself. Fortunately
this is made very easy with Cargo.
If you haven't already, you should begin by installing [Rust](https://www.rust-lang.org/install.html) and [Git](https://git-scm.com/downloads)
Open your terminal and navigate to the directory of you choice. We need to clone the git repository and then build it with Cargo.
2015-12-30 06:59:08 +08:00
```bash
2015-09-25 04:19:14 +08:00
git clone --depth=1 https://github.com/azerupi/mdBook.git
cd mdBook
cargo build --release
```
The executable `mdbook` will be in the `./target/release` folder, this should be added to the path.