If you've already installed Redocly CLI, you'll want to keep it as up to date as possible. Staying on top of versions ensures that you get the latest functionality and bug fixes. Depending on how you originally installed Redocly CLI, there are two ways to update it.
If you installed Redocly CLI in your project's npm dependencies follow these steps:
Navigate to your project root directory and open
package.jsonin any text editor.
Find the line that contains
"@redocly/cli":followed by the version number.
- Change the version number to the latest one in the Changelog .
Save the changes then close
npm installfrom the project root directory on the command line.
Commit the changed
package-lock.jsonfiles to your Git repository.
Check the project-level installation by running this command from the project root directory:
npx redocly --version.
If you installed Redocly CLI globally, run this command:
npm i -g @redocly/cli@latest
You can check your version by running