npx @redocly/cli bundle openapi.yaml

Category: Web App Development

npx @redocly/cli bundle openapi.yaml

Merge a multi-file OpenAPI spec into one file

Resolves all $ref includes and bundles the spec into a single document on stdout, ready for tools that need one file. The bundle command is the glue step before publishing docs or generating clients. Redirect output to a file to keep it.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.