OrvalOrval

CLI

Command line interface reference

Generate type-safe clients from OpenAPI specifications.

Basic Usage

orval

By default, Orval searches for an orval.config.js file.

Options

--input, -i

Path or URL to your OpenAPI specification:

orval --input ./petstore.yaml

--output, -o

Output path for generated files:

orval --output ./api/endpoints/petstoreFromFileSpec.ts

--config, -c

Path to your Orval config:

orval --config ./api/orval.config.js

--project, -p

Focus on specific projects in your config:

orval --project petstore
orval --project dogstore catstore

--watch, -w

Watch files and regenerate on changes:

orval --watch
orval --watch ./src

--clean

Clean generated files:

orval --clean
orval --clean ./src

This cleans all output target and schemas folders.

--formatter

Format generated files with the specified formatter (prettier, biome, or oxfmt):

orval --formatter prettier
orval --formatter biome
orval --formatter oxfmt

--tsconfig

Specify the path to your tsconfig:

orval --tsconfig ./src/tsconfig.json

--verbose

Enable verbose logging. Shows additional diagnostic output such as detected dependency versions:

orval --verbose

On this page