Govern your APIs with one tool. Lint, bundle, test, document, and generate clients from the command line.
open sourceMITself-hostablefree
Redocly CLI is an OpenAPI linter and API governance toolkit that checks OpenAPI 3.2, 3.1, 3.0, Swagger 2.0, AsyncAPI 3.x and 2.6, and Arazzo 1.x descriptions against an API style guide, following every $ref across files. Built-in rulesets (recommended, minimal, spec), configurable rules in redocly.yaml and custom plugins set the rules. It also bundles, splits and joins descriptions, builds a single-file HTML reference with Redoc CE, previews docs locally with a mock server, tests a live API against Arazzo workflows (respect), and, experimentally, generates typed clients and compares versions. It runs locally, in CI and in Docker; Redocly's paid platform is separate.
Ways to install
Package managers
Problems it solves
- enforce our API style guide on every OpenAPI change in CI
- catch invalid or inconsistent OpenAPI definitions before they reach the docs
- my OpenAPI spec is split across dozens of files and I need one bundled file for other tools
- split a huge OpenAPI YAML file into smaller files we can review
- build a static HTML API reference from an OpenAPI file that I can host anywhere
- preview API docs locally while editing the spec, with a mock server
- write a custom lint rule like 'operationId must be camelCase' without JSONPath
- remove internal endpoints from the public OpenAPI file during the build
- test that the live API actually returns what the OpenAPI description says
- lint AsyncAPI and Arazzo descriptions with the same tool as OpenAPI
- migrate our API lint rules off Spectral
- list the breaking changes between two versions of an API description
- output lint results in JUnit or Checkstyle format for our CI dashboard
Features
- lints OpenAPI 3.2, 3.1, 3.0, Swagger 2.0, AsyncAPI 3.x and 2.6, and Arazzo 1.x
- built-in rulesets: recommended, minimal and spec
- configurable rules in redocly.yaml and custom plugins
- lints multi-file descriptions without bundling
- codeframe, stylish, JSON, Markdown, Checkstyle and JUnit output
- bundle, split and join descriptions
- decorators that change a description as it bundles
- build-docs writes a single HTML file with Redoc CE
- local docs preview with a mock server
- respect runs Arazzo API tests against a live API
View 4 more
- typed client generation (experimental)
- diff and drift checks (experimental)
- agent skills for AI coding assistants
- Docker image
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Takes plugins | plan not known |
Alternatives
The same job
These do what Redocly CLI does.
- Stoplight Design, document, and build APIs faster