{"id":15012851,"url":"https://github.com/vivliostyle/vivliostyle-cli","last_synced_at":"2025-12-25T09:31:40.951Z","repository":{"id":38310430,"uuid":"98773778","full_name":"vivliostyle/vivliostyle-cli","owner":"vivliostyle","description":"⚒ Supercharge command-line publication workflow.","archived":false,"fork":false,"pushed_at":"2025-05-08T16:45:02.000Z","size":11822,"stargazers_count":181,"open_issues_count":27,"forks_count":25,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-05-13T20:02:47.027Z","etag":null,"topics":["headless-chrome","javascript","pdf","playwright","vite","vivliostyle"],"latest_commit_sha":null,"homepage":"https://docs.vivliostyle.org/#/vivliostyle-cli","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vivliostyle.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["vivliostyle"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-07-30T03:55:03.000Z","updated_at":"2025-05-08T16:44:57.000Z","dependencies_parsed_at":"2024-01-22T10:41:33.977Z","dependency_job_id":"5c95d388-e72e-4ed5-bd19-882e7e408f56","html_url":"https://github.com/vivliostyle/vivliostyle-cli","commit_stats":{"total_commits":988,"total_committers":16,"mean_commits":61.75,"dds":0.5182186234817814,"last_synced_commit":"bc5a65f1e7c55a046a11ea572644cc67a6e52711"},"previous_names":["pentapod/viola-savepdf","vivliostyle/vivliostyle-savepdf"],"tags_count":139,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivliostyle%2Fvivliostyle-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivliostyle%2Fvivliostyle-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivliostyle%2Fvivliostyle-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivliostyle%2Fvivliostyle-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vivliostyle","download_url":"https://codeload.github.com/vivliostyle/vivliostyle-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254029480,"owners_count":22002391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["headless-chrome","javascript","pdf","playwright","vite","vivliostyle"],"created_at":"2024-09-24T19:43:19.590Z","updated_at":"2025-12-25T09:31:35.915Z","avatar_url":"https://github.com/vivliostyle.png","language":"TypeScript","readme":"![Vivliostyle CLI](assets/cover.jpg)\n\n[![npm](https://flat.badgen.net/npm/v/@vivliostyle/cli)][npm-url]\n[![npm: total downloads](https://flat.badgen.net/npm/dt/@vivliostyle/cli)][npm-url]\n\n[npm-url]: https://npmjs.org/package/@vivliostyle/cli\n\nSupercharge your command-line publication workflow.\n\n## Install\n\n```\nnpm install -g @vivliostyle/cli\n```\n\n## Use\n\n```\nUsage: vivliostyle [options] [command]\n\nOptions:\n  -v, --version   output the version number\n  -h, --help      display help for command\n\nCommands:\n  init            create vivliostyle config\n  build           build and create PDF file\n  preview         launch preview server\n  help [command]  display help for command\n```\n\n### `init`\n\n\u003e create vivliostyle config file.\n\n```bash\nvivliostyle init\n```\n\nYou are new to Vivliostyle? Check out our latest project [Create Book](https://github.com/vivliostyle/create-book#readme).\nWith Create Book, you can easily bootstrap your book project and start writing without any extra effort.\n\n#### CLI Options\n\n```\nOptions:\n  --title \u003ctitle\u003e            title\n  --author \u003cauthor\u003e          author\n  -l, --language \u003clanguage\u003e  language\n  -s, --size  \u003csize\u003e         paper size\n  -T, --theme \u003ctheme\u003e        theme\n  --log-level \u003clevel\u003e        specify a log level of console outputs (choices: \"silent\", \"info\", \"verbose\", \"debug\", default: \"info\")\n  -h, --help                 display help for command\n```\n\n### `build`\n\n\u003e build and create PDF file.\n\nPut [vivliostyle.config.js](https://github.com/vivliostyle/create-book/blob/master/templates/default/vivliostyle.config.js) in the root directory, then:\n\n```bash\nvivliostyle build\n```\n\n#### CLI options\n\n```\nOptions:\n  -c, --config \u003cconfig_file\u003e         path to vivliostyle.config.js [vivliostyle.config.js]\n  -o, --output \u003cpath\u003e                specify output file name or directory [\u003ctitle\u003e.pdf]\n                                     This option can be specified multiple, then each -o options can be supplied one -f option.\n                                     ex: -o output1 -f webpub -o output2.pdf -f pdf\n  -f, --format \u003cformat\u003e              specify output format corresponding output target\n                                     If an extension is specified on -o option, this field will be inferenced automatically.\n  -s, --size \u003csize\u003e                  output pdf size\n                                     preset: A5, A4, A3, B5, B4, JIS-B5, JIS-B4, letter, legal, ledger\n                                     custom(comma separated): 182mm,257mm or 8.5in,11in\n  -m, --crop-marks                   print crop marks\n  --bleed \u003cbleed\u003e                    extent of the bleed area for printing with crop marks [3mm]\n  --crop-offset \u003coffset\u003e             distance between the edge of the trim size and the edge of the media size. [auto (13mm + bleed)]\n  --css \u003cCSS\u003e                        custom style CSS code. (ex: \":root {--my-color: lime;}\")\n  --style \u003cstylesheet\u003e               additional stylesheet URL or path\n  --user-style \u003cuser_stylesheet\u003e     user stylesheet URL or path\n  -d, --single-doc                   single HTML document input\n  -p, --press-ready                  make generated PDF compatible with press ready PDF/X-1a [false]\n                                     This option is equivalent with \"--preflight press-ready\"\n  -t, --timeout \u003cseconds\u003e            timeout limit for waiting Vivliostyle process [300]\n  -T, --theme \u003ctheme...\u003e             theme path or package name\n  --title \u003ctitle\u003e                    title\n  --author \u003cauthor\u003e                  author\n  -l, --language \u003clanguage\u003e          language\n  --reading-progression \u003cdirection\u003e  Direction of reading progression (choices: \"ltr\", \"rtl\")\n  --render-mode \u003cmode\u003e               if docker is set, Vivliostyle try to render PDF on Docker container [local] (choices: \"local\", \"docker\")\n  --preflight \u003cmode\u003e                 apply the process to generate PDF for printing (choices: \"press-ready\", \"press-ready-local\")\n  --preflight-option \u003coptions...\u003e    options for preflight process (ex: gray-scale, enforce-outline)\n                                     Please refer the document of press-ready for further information.\n                                     https://github.com/vibranthq/press-ready\n  --executable-browser \u003cpath\u003e        specify a path of executable browser you installed\n  --image \u003cimage\u003e                    specify a docker image to render\n  --viewer \u003cURL\u003e                     specify a URL of displaying viewer instead of vivliostyle-cli's one\n                                     It is useful that using own viewer that has staging features. (ex: https://vivliostyle.vercel.app/)\n  --viewer-param \u003cparameters\u003e        specify viewer parameters. (ex: \"allowScripts=false\u0026pixelRatio=16\")\n  --proxy-server \u003cproxyServer\u003e       HTTP/SOCK proxy server url for underlying Playwright\n  --proxy-bypass \u003cproxyBypass\u003e       optional comma-separated domains to bypass proxy\n  --proxy-user \u003cproxyUser\u003e           optional username for HTTP proxy authentication\n  --proxy-pass \u003cproxyPass\u003e           optional password for HTTP proxy authentication\n  --log-level \u003clevel\u003e                specify a log level of console outputs (choices: \"silent\", \"info\", \"verbose\", \"debug\", default: \"info\")\n  --ignore-https-errors              true to ignore HTTPS errors when Playwright browser opens a new page\n  --host \u003chost\u003e                      IP address the server should listen on\n  --port \u003cport\u003e                      port the server should listen on\n  --no-enable-static-serve           disable static file serving\n  --vite-config-file \u003cpath\u003e          Vite config file path\n  --no-vite-config-file              ignore Vite config file even if it exists\n  -h, --help                         display help for command\n```\n\n### `preview`\n\n\u003e open preview page and save PDF interactively.\n\n```bash\nvivliostyle preview\n```\n\n#### CLI options\n\n```\nOptions:\n  -c, --config \u003cconfig_file\u003e         path to vivliostyle.config.js\n  -T, --theme \u003ctheme...\u003e             theme path or package name\n  -s, --size \u003csize\u003e                  output pdf size\n                                     preset: A5, A4, A3, B5, B4, JIS-B5, JIS-B4, letter, legal, ledger\n                                     custom(comma separated): 182mm,257mm or 8.5in,11in\n  -m, --crop-marks                   print crop marks\n  --bleed \u003cbleed\u003e                    extent of the bleed area for printing with crop marks [3mm]\n  --crop-offset \u003coffset\u003e             distance between the edge of the trim size and the edge of the media size. [auto (13mm + bleed)]\n  --css \u003cCSS\u003e                        custom style CSS code. (ex: \":root {--my-color: lime;}\")\n  --style \u003cstylesheet\u003e               additional stylesheet URL or path\n  --user-style \u003cuser_stylesheet\u003e     user stylesheet URL or path\n  -d, --single-doc                   single HTML document input\n  -q, --quick                        quick loading with rough page count\n  --title \u003ctitle\u003e                    title\n  --author \u003cauthor\u003e                  author\n  -l, --language \u003clanguage\u003e          language\n  --reading-progression \u003cdirection\u003e  Direction of reading progression (choices: \"ltr\", \"rtl\")\n  --executable-browser \u003cpath\u003e        specify a path of executable browser you installed\n  --viewer \u003cURL\u003e                     specify a URL of displaying viewer instead of vivliostyle-cli's one\n                                     It is useful that using own viewer that has staging features. (ex: https://vivliostyle.vercel.app/)\n  --viewer-param \u003cparameters\u003e        specify viewer parameters. (ex: \"allowScripts=false\u0026pixelRatio=16\")\n  --browser \u003cbrowser\u003e                EXPERIMENTAL SUPPORT: Specify a browser type to launch Vivliostyle viewer [chromium]\n                                     Currently, Firefox and Webkit support preview command only! (choices: \"chromium\", \"firefox\", \"webkit\")\n  --proxy-server \u003cproxyServer\u003e       HTTP/SOCK proxy server url for underlying Playwright\n  --proxy-bypass \u003cproxyBypass\u003e       optional comma-separated domains to bypass proxy\n  --proxy-user \u003cproxyUser\u003e           optional username for HTTP proxy authentication\n  --proxy-pass \u003cproxyPass\u003e           optional password for HTTP proxy authentication\n  --log-level \u003clevel\u003e                specify a log level of console outputs (choices: \"silent\", \"info\", \"verbose\", \"debug\", default: \"info\")\n  --ignore-https-errors              true to ignore HTTPS errors when Playwright browser opens a new page\n  --host \u003chost\u003e                      IP address the server should listen on\n  --port \u003cport\u003e                      port the server should listen on\n  --no-open-viewer                   do not open viewer\n  --no-enable-static-serve           disable static file serving\n  --no-enable-viewer-start-page      disable viewer start page\n  --vite-config-file \u003cpath\u003e          Vite config file path\n  --no-vite-config-file              ignore Vite config file even if it exists\n  -h, --help                         display help for command\n```\n\n## User Guide\n\nSee [User Guide](https://docs.vivliostyle.org/#/vivliostyle-cli)\n\n## Contribute\n\nSee [Contribution Guide](CONTRIBUTING.md).\n\n[![](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/images/0)](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/links/0)[![](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/images/1)](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/links/1)[![](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/images/2)](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/links/2)[![](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/images/3)](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/links/3)[![](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/images/4)](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/links/4)[![](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/images/5)](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/links/5)[![](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/images/6)](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/links/6)[![](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/images/7)](https://sourcerer.io/fame/uetchy/vivliostyle/vivliostyle-cli/links/7)\n\n## License\n\nLicensed under [AGPL Version 3](http://www.gnu.org/licenses/agpl.html).\n","funding_links":["https://github.com/sponsors/vivliostyle"],"categories":["Official","Building"],"sub_categories":["Workflows"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvivliostyle%2Fvivliostyle-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvivliostyle%2Fvivliostyle-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvivliostyle%2Fvivliostyle-cli/lists"}