https://github.com/plutov/oq
Terminal OpenAPI Spec viewer
https://github.com/plutov/oq
hacktoberfest
Last synced: 4 months ago
JSON representation
Terminal OpenAPI Spec viewer
- Host: GitHub
- URL: https://github.com/plutov/oq
- Owner: plutov
- License: mit
- Created: 2025-09-12T14:04:46.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-09-21T20:11:15.000Z (4 months ago)
- Last Synced: 2025-09-21T22:10:10.305Z (4 months ago)
- Topics: hacktoberfest
- Language: Go
- Homepage:
- Size: 1.85 MB
- Stars: 648
- Watchers: 3
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-repos - plutov/oq - Terminal OpenAPI Spec viewer (Go)
README
# oq - a terminal-based OpenAPI Spec (OAS) viewer

## Usage
```bash
oq openapi.yaml
# or
cat openapi.yaml | oq
# or
curl https://api.example.com/openapi.json | oq
```
### Keyboard Shortcuts
Press `?` to see the help screen with all available keyboard shortcuts.
## OpenAPI Support
`oq` supports all 3.* OpenAPI specification versions:
- 3.0
- 3.1
- 3.2
Both JSON and YAML formats are supported.
Note: `oq` uses the [libopenapi](https://github.com/pb33f/libopenapi) library as it supports all OpenAPI versions and is actively maintained.
## Installation
Using go install:
```bash
go install github.com/plutov/oq@latest
```
Package managers
Using Homebrew (macOS/Linux):
```bash
brew install plutov/tap/oq
```
Arch Linux (AUR):
```bash
yay -S oq-openapi-viewer-git
```
You can also download the compiled binaries from the Releases page.
### From source
```bash
git clone git@github.com:plutov/oq.git
cd oq
go build -o oq .
```
## License
MIT License - see [LICENSE](LICENSE) file for details.
## Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
When contributing:
1. Ensure tests pass: `go test -v`
2. Test all supported OpenAPI versions (3.0, 3.1, 3.2)
3. If the UI changes, make sure to run `vhs preview.tape` to generate a new preview GIF
4. Try to extend test coverage by introducing new example OpenAPI specs in the `examples` folder