oag-cli-0.8.0 is not a library.
oag-cli
Command-line interface for oag.
Installs a single binary called oag that parses OpenAPI specs and generates typed code (clients and servers).
Install
Commands
| Command | Description |
|---|---|
oag generate |
Generate code from an OpenAPI spec |
oag validate |
Validate an OpenAPI spec and report errors |
oag inspect |
Dump the parsed intermediate representation (YAML or JSON) |
oag init |
Create a .urmzd.oag.yaml config file in the current directory |
oag completions <shell> |
Generate shell completions (bash, zsh, fish, etc.) |
Configuration
The CLI automatically loads .urmzd.oag.yaml from the current directory. You can override the input spec with -i/--input:
# Use config file
# Override input spec
The new config format uses a generators map instead of a target field. Each generator has its own output directory and settings. See the root README for the full configuration reference.
The old config format (with target, output, output_options, and client fields) is still supported for backward compatibility.
Depends on
oag-core— parser, IR, config, andCodeGeneratortraitoag-node-client— TypeScript/Node client generatoroag-react-swr-client— React/SWR hooks generatoroag-fastapi-server— Python FastAPI server generator