* docs: updated commands documentation per issue 1429 and minor corrections, ran prettier * docs: updated commands documentation per issue 1429 and included pr 1560 feedback * docs: minor formatting and copyedits --------- Co-authored-by: Diana Cheung <18452752+dianacheung@users.noreply.github.com> Co-authored-by: Lorna Mitchell <lorna.mitchell@redocly.com>
2.2 KiB
tocMaxDepth
| tocMaxDepth |
|---|
| 2 |
Redocly CLI commands
Documentation commands:
preview-docsPreview API reference docs for the specified API description.build-docsBuild API description into an HTML file.previewStart a local preview of a Redocly project with one of the product NPM packages.
API management commands:
statsGather statistics for a document.bundleBundle API description.splitSplit API description into a multi-file structure.joinJoin API descriptions [experimental feature].
Linting commands:
lintLint API description.check-configLint Redocly configuration file.
Redocly platform commands:
loginLogin to the Redocly API registry with an access token.logoutClear your stored credentials for the Redocly API registry.pushPush an API description to the Redocly API registry.
Supporting commands:
completionGenerate autocomplete commands (includes install instructions).
Additional options
There are some parameters supported by all commands:
--version display the current version of redocly.
--help display the command help, or the help for the subcommand if you used one. For example:
redocly lint --help
Try these with any of the other commands.
Config file
Redocly CLI comes with one primary configuration file (redocly.yaml), also known as the Redocly configuration file.
This file defines all of the config options available to you, including the location of your files (for unbundling and bundling), and linting rules (for validation against the OpenAPI Specification).
The Redocly configuration file must sit in your root directory.
If Redocly CLI finds redocly.yaml in the root directory, it uses the options set in that file when executing commands.
You can also specify a config file to most commands using --config myconfig.yaml as part of the command. For example:
redocly lint --config redocly-official.yaml openapi.yaml
For more information, refer to the Redocly configuration file docs.