Socket
Socket
Sign inDemoInstall

redoc-cli

Package Overview
Dependencies
337
Maintainers
2
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    redoc-cli

ReDoc's Command Line Interface


Version published
Maintainers
2
Install size
58.5 MB
Created

Readme

Source

redoc-cli

DEPRECATED: this package is deprecated. Use npx @redocly/cli build-docs <api> instead.

ReDoc's Command Line Interface

Installation

You can use redoc-cli by installing the package globally, or using npx.

Usage

The two following commands are available:

  • redoc-cli serve [spec] - starts the server with spec rendered with ReDoc. Supports a server-side rendering mode (--ssr) and can watch the spec (--watch) to automatically reload the page whenever it changes.
    Deprecated. Use npx @redocly/cli preview-docs [spec]
  • redoc-cli bundle [spec] - bundles spec and Redoc into a zero-dependency HTML file.
    Deprecated. Use Use "build" command instead.
  • redoc-cli build [spec] - build spec and Redoc into a zero-dependency HTML file.

Some examples:

  • Bundle with the main color changed to orange:
    $ redoc-cli build [spec] --options.theme.colors.primary.main=orange
  • Serve with the nativeScrollbars option set to true:
    $ redoc-cli serve [spec] --options.nativeScrollbars
  • Bundle using a custom Handlebars template (check the default template for an example):
    $ redoc-cli build [spec] -t custom.hbs
  • Bundle using a custom template and add custom templateOptions:
    $ redoc-cli build [spec] -t custom.hbs --templateOptions.metaDescription "Page meta description"
With a Redocly configuration file (more info):
  1. Go to folder with your Redocly configuration file (.redocly.yaml or redocly.yaml) and your OpenAPI definition file.
  2. Build the site using the build command (options from the Redocly configuration file will be automatically fetched):
    redoc build openapi.yaml

For more details, run redoc-cli --help.

FAQs

Last updated on 06 Mar 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc