Skip to content
Last updated

Use Redocly CLI with Redoc CE

With Redocly CLI, you can bundle your OpenAPI definition and API documentation (made with Redoc CE) into an HTML file and render it locally.

Build API documentation

The Redocly CLI build-docs command uses Redoc CE to transform an API description file into a human-readable HTML file.

To build an HTML file using Redocly CLI:

  • Enter the following command, replacing apis/openapi.yaml with your API description file's name and path:
npx @redocly/cli build-docs apis/openapi.yaml

After the command finishes running, you can share the HTML file or host it on a platform of your choice.

Resources

  • build-docs - Learn about the different options and ways you can use this Redocly CLI command
  • Redocly CLI commands - Explore how you can use Redocly CLI's to maintain and transform your API description file
  • Redoc CE deployment guide - Follow step-by-step instructions for setting up your Redoc CE project