Skip to content

CLI

The plugin adds these commands to the Litestar CLI. They run against the application that litestar discovers or that --app names.

Export AsyncAPI documents without starting a server.

litestar asyncapi export

Write the canonical application document to a file or stdout.

litestar asyncapi export [OPTIONS]
Option Value Default Description
--format json, yaml json Serialization of the written document.
--output file path File to write the document to; the document goes to stdout when omitted.
--overwrite flag Replace an existing output file.
litestar --app app:app asyncapi export
litestar --app app:app asyncapi export --format yaml --output asyncapi.yaml --overwrite