Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vivliostyle/vivliostyle-cli
⚒ Supercharge command-line publication workflow.
https://github.com/vivliostyle/vivliostyle-cli
headless-chrome javascript pdf playwright vivliostyle
Last synced: 5 days ago
JSON representation
⚒ Supercharge command-line publication workflow.
- Host: GitHub
- URL: https://github.com/vivliostyle/vivliostyle-cli
- Owner: vivliostyle
- License: agpl-3.0
- Created: 2017-07-30T03:55:03.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2025-01-22T06:57:09.000Z (30 days ago)
- Last Synced: 2025-02-09T03:03:44.948Z (12 days ago)
- Topics: headless-chrome, javascript, pdf, playwright, vivliostyle
- Language: TypeScript
- Homepage: https://docs.vivliostyle.org/#/vivliostyle-cli
- Size: 11.9 MB
- Stars: 172
- Watchers: 14
- Forks: 24
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-vivliostyle - @vivliostyle/cli - A command-line interface of Vivliostyle. (Official)
- awesome-vivliostyle - @vivliostyle/cli - A command-line interface of Vivliostyle. (Official)
- awesome_ai_agents - Vivliostyle-Cli - ⚒ Supercharge command-line publication workflow. (Building / Workflows)
- awesome_ai_agents - Vivliostyle-Cli - ⚒ Supercharge command-line publication workflow. (Building / Workflows)
README

[][npm-url]
[][npm-url][npm-url]: https://npmjs.org/package/@vivliostyle/cli
Supercharge your command-line publication workflow.
## Install
```
npm install -g @vivliostyle/cli
```## Use
```
Usage: vivliostyle [options] [command]Options:
-v, --version output the version number
-h, --help display help for commandCommands:
init create vivliostyle config
build build and create PDF file
preview launch preview server
help [command] display help for command
```### `init`
> create vivliostyle config file.
```bash
vivliostyle init
```You are new to Vivliostyle? Check out our latest project [Create Book](https://github.com/vivliostyle/create-book#readme).
With Create Book, you can easily bootstrap your book project and start writing without any extra effort.#### CLI Options
```
Options:
--title title
--author author
-l, --language language
-s, --size paper size
-T, --theme theme
--log-level specify a log level of console outputs (choices: "silent", "info",
"verbose", "debug", default: "info")
-h, --help display help for command
```### `build`
> build and create PDF file.
Put [vivliostyle.config.js](https://github.com/vivliostyle/create-book/blob/master/templates/default/vivliostyle.config.js) in the root directory, then:
```bash
vivliostyle build
```
#### CLI options
```
Options:
-c, --config path to vivliostyle.config.js [vivliostyle.config.js]
-o, --output specify output file name or directory [.pdf]
This option can be specified multiple, then each -o options can
be supplied one -f option.
ex: -o output1 -f webpub -o output2.pdf -f pdf
-f, --format specify output format corresponding output target
If an extension is specified on -o option, this field will be
inferenced automatically.
-s, --size output pdf size
preset: A5, A4, A3, B5, B4, JIS-B5, JIS-B4, letter, legal,
ledger
custom(comma separated): 182mm,257mm or 8.5in,11in
-m, --crop-marks print crop marks
--bleed extent of the bleed area for printing with crop marks [3mm]
--crop-offset distance between the edge of the trim size and the edge of the
media size. [auto (13mm + bleed)]
--css custom style CSS code. (ex: ":root {--my-color: lime;}")
--style additional stylesheet URL or path
--user-style user stylesheet URL or path
-d, --single-doc single HTML document input
-p, --press-ready make generated PDF compatible with press ready PDF/X-1a [false]
This option is equivalent with "--preflight press-ready"
-t, --timeout timeout limit for waiting Vivliostyle process [120]
-T, --theme theme path or package name
--title title
--author author
-l, --language language
--reading-progression Direction of reading progression (choices: "ltr", "rtl")
--render-mode if docker is set, Vivliostyle try to render PDF on Docker
container [local] (choices: "local", "docker")
--preflight apply the process to generate PDF for printing (choices:
"press-ready", "press-ready-local")
--preflight-option options for preflight process (ex: gray-scale, enforce-outline)
Please refer the document of press-ready for further
information.
https://github.com/vibranthq/press-ready
--executable-browser specify a path of executable browser you installed
--image specify a docker image to render
--http launch an HTTP server hosting contents instead of file protocol
It is useful that requires CORS such as external web fonts.
--viewer specify a URL of displaying viewer instead of vivliostyle-cli's
one
It is useful that using own viewer that has staging features.
(ex: https://vivliostyle.vercel.app/)
--viewer-param specify viewer parameters. (ex:
"allowScripts=false&pixelRatio=16")
--proxy-server HTTP/SOCK proxy server url for underlying Playwright
--proxy-bypass optional comma-separated domains to bypass proxy
--proxy-user optional username for HTTP proxy authentication
--proxy-pass optional password for HTTP proxy authentication
--log-level specify a log level of console outputs (choices: "silent",
"info", "verbose", "debug", default: "info")
--ignore-https-errors true to ignore HTTPS errors when Playwright browser opens a new page
-h, --help display help for command
```### `preview`
> open preview page and save PDF interactively.
```bash
vivliostyle preview
```#### CLI options
```
Options:
-c, --config path to vivliostyle.config.js
-T, --theme theme path or package name
-s, --size output pdf size
preset: A5, A4, A3, B5, B4, JIS-B5, JIS-B4, letter, legal,
ledger
custom(comma separated): 182mm,257mm or 8.5in,11in
-m, --crop-marks print crop marks
--bleed extent of the bleed area for printing with crop marks [3mm]
--crop-offset distance between the edge of the trim size and the edge of the
media size. [auto (13mm + bleed)]
--css custom style CSS code. (ex: ":root {--my-color: lime;}")
--style additional stylesheet URL or path
--user-style user stylesheet URL or path
-d, --single-doc single HTML document input
-q, --quick quick loading with rough page count
--title title
--author author
-l, --language language
--reading-progression Direction of reading progression (choices: "ltr", "rtl")
--executable-browser specify a path of executable browser you installed
--http launch an HTTP server hosting contents instead of file protocol
It is useful that requires CORS such as external web fonts.
--viewer specify a URL of displaying viewer instead of vivliostyle-cli's
one
It is useful that using own viewer that has staging features.
(ex: https://vivliostyle.vercel.app/)
--viewer-param specify viewer parameters. (ex:
"allowScripts=false&pixelRatio=16")
--browser EXPERIMENTAL SUPPORT: Specify a browser type to launch
Vivliostyle viewer [chromium]
Currently, Firefox and Webkit support preview command only!
(choices: "chromium", "firefox", "webkit")
--proxy-server HTTP/SOCK proxy server url for underlying Playwright
--proxy-bypass optional comma-separated domains to bypass proxy
--proxy-user optional username for HTTP proxy authentication
--proxy-pass optional password for HTTP proxy authentication
--log-level specify a log level of console outputs (choices: "silent",
"info", "verbose", "debug", default: "info")
--ignore-https-errors true to ignore HTTPS errors when Playwright browser opens a new page
-h, --help display help for command
```## User Guide
See [User Guide](https://docs.vivliostyle.org/#/vivliostyle-cli)
## Contribute
See [Contribution Guide](CONTRIBUTING.md).
[](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/links/0)[](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/links/1)[](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/links/2)[](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/links/3)[](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/links/4)[](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/links/5)[](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/links/6)[](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/links/7)
## License
Licensed under [AGPL Version 3](http://www.gnu.org/licenses/agpl.html).