Skip to main content



You can use the load command to create a .openapiconfig file to avoid having to pass the openapi document when running openapicmd commands.

openapicmd tries to load a .openapiconfig file in the current working directory or parent directories for default parameters.

Supported config filenames are .openapiconfig .openapiconfig.yml openapiconfig.yaml

Loading a definition file

To avoid having to pass the openapi file as an argument to openapicmd commands, you can load a document, which creates or updates a .openapiconfig file.

openapi load

Now you can run commands without passing the definition:

$ openapi info

title: Swagger Petstore - OpenAPI 3.0
version: 1.0.17
This is a sample Pet Store Server based on the OpenAPI 3.0 specification.


You can also set up authentication strategies for API calls using the auth command.

openapi auth
? use security scheme api_key
? api_key: Set API key (api_key) secret123
Wrote auth config to /Users/viljamikuosmanen/Projects/openapi-stack/.openapiconfig. You can now use openapi call with the following auth configs:
- api_key


The unload command can be used to quickly delete an existing .openapiconfig file.

openapi unload