2018-03-18 18:55:53 +03:00
# redoc-cli
**[ReDoc](https://github.com/Rebilly/ReDoc)'s Command Line Interface**
## Installation
2018-03-20 12:39:53 +03:00
You can use redoc cli by installing `redoc-cli` globally or using [npx ](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b ).
2018-03-18 18:55:53 +03:00
## Usage
2018-03-20 12:39:53 +03:00
2018-04-26 17:10:37 +03:00
Two following commands are available:
2018-03-20 12:39:53 +03:00
- `redoc-cli serve [spec]` - starts the server with `spec` rendered with ReDoc. Supports SSR mode (`--ssr`) and can watch the spec (`--watch`)
- `redoc-cli bundle [spec]` - bundles spec and ReDoc into **zero-dependency** HTML file.
Some examples:
2018-03-20 12:52:08 +03:00
- Bundle with main color changed to `orange` : < br > `$ redoc-cli bundle [spec] --options.theme.colors.main=orange`
- Serve with `nativeScrollbars` option set to true: < br > `$ redoc-cli serve [spec] --options.nativeScrollbars`
2018-03-21 18:52:41 +03:00
- Bundle using custom template (check [default template ](https://github.com/Rebilly/ReDoc/blob/master/cli/template.hbs ) for reference): < br > `$ redoc-cli bundle [spec] -t custom.hbs`
2018-03-20 12:39:53 +03:00
2018-04-26 17:10:37 +03:00
For more details run `redoc-cli --help` .