Update Redocly CLI
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.
How to update a project-level installation
If you installed Redocly CLI in your project's npm dependencies follow these steps:
-
Navigate to your project root directory and open
package.json
in 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
package.json
. -
Run
npm install
from the project root directory on the command line. -
Commit the changed
package.json
andpackage-lock.json
files to your Git repository. -
Check the project-level installation by running this command from the project root directory:
npx redocly --version
.
How to update a global installation
If you installed Redocly CLI globally, run this command:
npm i -g @redocly/cli@latest
You can check your version by running redocly --version
.