https://github.com/izubkov/oapi-cli
:zap: lightweight tool to manipulate OpenAPI specs
https://github.com/izubkov/oapi-cli
cli openapi rust rust-crate tool toolkit
Last synced: 16 days ago
JSON representation
:zap: lightweight tool to manipulate OpenAPI specs
- Host: GitHub
- URL: https://github.com/izubkov/oapi-cli
- Owner: izubkov
- License: mit
- Created: 2025-11-17T19:33:38.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2025-12-02T09:20:53.000Z (7 months ago)
- Last Synced: 2026-06-02T21:19:43.730Z (23 days ago)
- Topics: cli, openapi, rust, rust-crate, tool, toolkit
- Language: Rust
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# oapi-cli
CLI tool for modifying, filtering and pruning OpenAPI specs. Especially useful when working with large OpenAPI specs, `oapi-cli` is a command-line tool that filters, prunes, and extracts only the paths and components you need. Ideal for preparing compact specs for AI agents and LLM workflows.
## Usage
### Filtering
Keeps only paths with a given prefix and removes unused components.
```bash
# keep only exact path
oapi-cli filter -i openapi.yaml -o openapi-no-example.yaml --path /api/v1/example
# keep all paths starting with /api/v1/example/
oapi-cli filter -i openapi.yaml -o openapi-no-example.yaml --path "/api/v1/example/*"
```
## Build
```bash
cargo build --release
```