Rule OpenAPI with one CLI

Bring versatile OpenAPI validation, linting & bundling to your command line (and VS Code!) with this open-source Swiss knife.

Keep your OpenAPI descriptions spot-on with minimal effort

Validate a multi-file definition without having to bundle it

Behemoth YAML gets old pretty quick. An unbundled definition is far easier to edit and check for duplicates. Our Redocly CLI lets you quickly validate and lint a multi-file definition before bundling it into one file for distribution.

1

Install

No server required. Use npm, yarn, npx or Docker. Install it now

2

Validate

Ensure OpenAPI compliance and lint against custom rules.

3

Bundle

Prepare your API for the world with a rich set of options.

4

Deploy

Add to registry and doc-it-like-code, from CLI or from dashboard.

Hunt the error in context

Solve errors crazy-fast, with complete visibility and a complete set of built-in options supporting the full OpenAPI spec up to 3.1. Find errors anywhere:

  • By filename, line, character number
  • In stack traces and code frames
  • Remote references by file path and URL
  • Human-readable error messages
  • Suggestions for misspelled types

Built-in development server for easy previewing

Preview your entire reference docs locally without having to bundle your definition, whether you’re using Redocly or our open-source version Redoc.

Install the Redocly CLI

npm i -g @redocly/cli@latest

Craft your API design flow with rules and decorators

A.K.A. Style guides: versatile, easy to customize JavaScript modules.

Rule-based linting

Teach Redocly’s CLI to detect issues the way your process requires. Pick from a plethora of built-in rules, or write your own with simple JavaScript functions referenced in the Redocly configuration file.

  • Configure rule severity levels
  • Rules by OAS version
  • Nested rules by context, location, and more
  • Type tree extensions

Define parallel API definitions with decorators

Decorators are a Redocly-exclusive customization layer you can use to effectively build different versions of the same definition. They modify content during the bundle process, so you can e.g. add code samples, remove schema or change path structure after validation is complete.

Read the Docs
Change APIs risk-free

Change APIs risk-free

Add or remove content by use case while keeping your definition safely validated.
Override rules

Override rules (and roles)

Let writers or different development teams override information to suit their goals.
Unlock governance

Unlock governance

Consolidate similar APIs and ‘split the diff’ with decorators instead of manual work.
Community Style guides

Community Style guides

Tap into the hive mind’s decorator wisdom! If you’re interested, let us know or contribute to Redocly CLI.

Expand API validation across your entire workflow

Visual Studio Code Extension New

Validate in VS Code way before it’s CLI time

Write, validate, and maintain your OpenAPI documents with a single VS Code extension. Get warnings about errors in OpenAPI definitions and quickly access referenced schemas and the files that contain them.

Make the most of docs-like-code

Our CLI already powers Redocly Workflows under the hood. Enjoy the same collab power with your definition files and configuration neatly organized in Git. Starting from scratch? Use our companion repository template to get up to speed with the Way of the Multi-File API.

Validate all things API with one CLI