With Redocly CLI, you can bundle your OpenAPI definition and API documentation (made with Redoc CE) into an HTML file and render it locally.
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.yamlwith your API description file's name and path:
npx @redocly/cli build-docs apis/openapi.yamlAfter the command finishes running, you can share the HTML file or host it on a platform of your choice.
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