Skip to main content
Bruno CLI allows you to import API specifications directly into Bruno collections from the command line, which can be integrated into CI/CD pipelines whenever API changes are committed.

Importing OpenAPI specifications

Option 1: Import to Bruno collection

This will import the OpenAPI specification (supports both YAML and JSON formats) and generate a Bruno collection in the specified output directory.
copy
bru import openapi \
  --source <your-openapi.yaml> \
  --output <preferred-location> \
  --collection-name "Petstore API"
Where:
  • <your-openapi.yaml>: Path to your OpenAPI specification file (can be either YAML or JSON format)
  • <preferred-location>: Directory where you want to save the collection
  • --collection-name: Custom name for the collection

Option 2: Import to single JSON file

This will import the OpenAPI specification and generate a Bruno collection as a single JSON file at the specified location.
copy
bru import openapi \
  --source <your-openapi.yaml> \
  --output-file <preferred-location>.json \
  --collection-name "Petstore API"
Where:
  • <your-openapi.yaml>: Path to your OpenAPI specification file (can be either YAML or JSON format)
  • <preferred-location>: Base path and filename for your JSON output
  • --collection-name: Custom name for the collection

Response examples

When importing an OpenAPI specification, any response examples defined in the source collection are preserved and written to the generated .bru files. This means example request/response pairs are carried over automatically during CLI import, so you don’t lose documentation context when converting collections.

Importing WSDL (SOAP APIs)

This will import the WSDL file and generate a Bruno collection with SOAP requests in the specified output directory.
copy
bru import wsdl <your-service.wsdl> --output <preferred-location>
Where:
  • <your-service.wsdl>: Path to your WSDL file
  • <preferred-location>: Directory where you want to save the collection