Optic's Open Source tools make OpenAPI and API-first practices easy for any team to adopt.
npm install -g @useoptic/opticUnderstand the API changes between two versions of an OpenAPI descriptions. Optic helps teams review proposed API changes:
diff current branch with base branch
optic diff openapi.yaml --base mainbetween two OpenAPI files
optic diff openapi.yaml openapi-changed.yamlAPI diffs containing breaking changes will be flagged so you do not break consumers. Optic helps you keep your promises.
optic diff openapi.yaml --base main --checkRead breaking change documentation
Create new and update existing OpenAPI specifications straight from your services' traffic. Optic makes it easy to adopt OpenAPI in a day, without changing how you work.
Show Optic real API traffic using the oas capture commands. Traffic can come from your development environment, tests, or the browser.
oas capture --proxy localhost:3000 traffic.harCaptured traffic is like working copy in Git. Use oas status to see the difference between how your OpenAPI specification says your API works, and how it actually works.
oas openapi.yaml status --har traffic.harRun oas add and oas update to update the spec. Optic precision patches your OpenAPI file with the same additions, updates, and removals you would manually write. This is faster and much less error-prone than writing OpenAPI by hand.
oas openapi.yaml add --har traffic.har GET /listsoas openapi.yaml update --har traffic.harUsing
oasto update your spec is like working with a collaborator. It helps you write all the boilerplate OpenAPI and keep your spec in sync with the actual API's behavior.✅ Never overwrites changes developers make to the same OpenAPI file
✅ Respects $refs across multiple files
✅ Improves accuracy of your specification
✅ Speeds up your team
Read Adopting OpenAPI documentation
- Documentation
- Beyond API Linting: How Optic is different
- Adding Optic to your CI Pipeline
- Book office hours
MIT
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!




