Documentation commands:
previewStart a local preview of a Redocly project with one of the product NPM packages.translateGenerate translation keys for a Redocly Realm, Reef, or Revel project.ejectEject and modify components from the core theme in a Redocly Realm, Reef, or Revel project.build-docsBuild an API description into an HTML file.
API management commands:
bundleBundle an API description.generate-clientGenerate a typed TypeScript client from an OpenAPI description [experimental feature].eject-generatorCopy a built-in client generator into your repository as an editable file [experimental feature].joinJoin API descriptions [experimental feature].scoreScore an API for integration simplicity and AI agent readiness.splitSplit an API description into a multi-file structure.statsGather statistics for a document.
Linting commands:
lintLint an API description.check-configLint the Redocly configuration file.
Testing commands:
respectExecute API tests described in an Arazzo description.generate-arazzoGenerate an Arazzo description from an OpenAPI description.driftDetect drift between recorded HTTP traffic and an OpenAPI description [experimental feature].proxyCapture live HTTP traffic through a reverse proxy into a HAR file [experimental feature].generate-specInfer an OpenAPI description from recorded HTTP traffic [experimental feature].
Redocly platform commands:
loginLog in to Reunite.logoutClear your stored credentials.pushPush an API description to Reunite.push-statusTrack an in-progress push operation to Reunite.
Supporting commands:
completionGenerate autocomplete commands (includes install instructions).
All commands support these parameters:
--version displays the current version of redocly.
--help displays the help for the command. If you used a subcommand, it displays the help for that subcommand. For example:
npx @redocly/cli@latest lint --helpTry these with any of the other commands.
Redocly CLI has one primary configuration file (redocly.yaml), also called the Redocly configuration file. This file defines all of the configuration options available to you. These options include the location of your files (for unbundling and bundling) and the linting rules (for validation against the OpenAPI Specification).
The Redocly configuration file must be in your root directory. If Redocly CLI finds redocly.yaml in the root directory, it uses the options set in that file when it executes commands.
For most commands, you can also specify a configuration file with --config myconfig.yaml as part of the command. For example:
npx @redocly/cli@latest lint --config redocly-official.yaml openapi.yamlFor more information, refer to the Redocly configuration file docs.