> Markdown version of https://www.asyncapi.com/docs/tools/cli/usage
> Index: https://www.asyncapi.com/llms.txt

# Usage

<!-- 

This file is automatically generated from updateUsageDocs.js script. In package.json in line 158-161 lines the following steps has been executed in order to run this script successfully - 

* generate:readme:create: It creates the initial content for the README file by printing the usage and commands tags using printf and redirects the output to scripts/README.md file.
* generate:readme:commands: It changes the directory to the scripts folder and executes the oclif readme command. This command generates the usage and commands sections based on the CLI commands and updates the content in the scripts/README.md file.
* generate:assets: This script combines the two previously mentioned scripts (generate:readme:toc and generate:commands) to generate the necessary assets, such as the README file and usage documentation.
* generate:commands: This script executes the following steps:
 - Runs the generate:readme:create script to create the initial content for the README file.
 - Executes the generate:readme:commands script to generate the usage and commands sections based on the CLI commands.
 - Runs the updateUsageDocs.js script using Node.js to update the usage documentation file with the contents of the generated README file.
 - Deletes the scripts/README.md file using the rimraf command.

-->

The AsyncAPI CLI makes it easier to work with AsyncAPI documents.
# Usage

<!-- usage -->
```sh-session
$ npm install -g @asyncapi/cli
$ asyncapi COMMAND
running command...
$ asyncapi (--version|--v)
@asyncapi/cli/5.0.7 darwin-arm64 node-v24.7.0
$ asyncapi --help [COMMAND]
USAGE
  $ asyncapi COMMAND
...
```
<!-- usagestop -->

# Commands

<!-- commands -->
* [`asyncapi autocomplete [SHELL]`](#asyncapi-autocomplete-shell)
* [`asyncapi bundle`](#asyncapi-bundle)
* [`asyncapi config`](#asyncapi-config)
* [`asyncapi config analytics`](#asyncapi-config-analytics)
* [`asyncapi config auth add PATTERN TOKEN`](#asyncapi-config-auth-add-pattern-token)
* [`asyncapi config context`](#asyncapi-config-context)
* [`asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH`](#asyncapi-config-context-add-context-name-spec-file-path)
* [`asyncapi config context current`](#asyncapi-config-context-current)
* [`asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH`](#asyncapi-config-context-edit-context-name-new-spec-file-path)
* [`asyncapi config context init [CONTEXT-FILE-PATH]`](#asyncapi-config-context-init-context-file-path)
* [`asyncapi config context list`](#asyncapi-config-context-list)
* [`asyncapi config context remove CONTEXT-NAME`](#asyncapi-config-context-remove-context-name)
* [`asyncapi config context use CONTEXT-NAME`](#asyncapi-config-context-use-context-name)
* [`asyncapi config versions`](#asyncapi-config-versions)
* [`asyncapi convert [SPEC-FILE]`](#asyncapi-convert-spec-file)
* [`asyncapi diff OLD NEW`](#asyncapi-diff-old-new)
* [`asyncapi format [SPEC-FILE]`](#asyncapi-format-spec-file)
* [`asyncapi generate`](#asyncapi-generate)
* [`asyncapi generate client LANGUAGE [ASYNCAPI]`](#asyncapi-generate-client-language-asyncapi)
* [`asyncapi generate fromTemplate [ASYNCAPI] [TEMPLATE]`](#asyncapi-generate-fromtemplate-asyncapi-template)
* [`asyncapi generate models LANGUAGE FILE`](#asyncapi-generate-models-language-file)
* [`asyncapi new`](#asyncapi-new)
* [`asyncapi new file`](#asyncapi-new-file)
* [`asyncapi new template`](#asyncapi-new-template)
* [`asyncapi optimize [SPEC-FILE]`](#asyncapi-optimize-spec-file)
* [`asyncapi pretty SPEC-FILE`](#asyncapi-pretty-spec-file)
* [`asyncapi start`](#asyncapi-start)
* [`asyncapi start api`](#asyncapi-start-api)
* [`asyncapi start preview SPEC-FILE`](#asyncapi-start-preview-spec-file)
* [`asyncapi start studio [SPEC-FILE]`](#asyncapi-start-studio-spec-file)
* [`asyncapi validate [SPEC-FILE]`](#asyncapi-validate-spec-file)

## `asyncapi autocomplete [SHELL]`

Display autocomplete installation instructions.

```
USAGE
  $ asyncapi autocomplete [SHELL] [-r]

ARGUMENTS
  [SHELL]  (zsh|bash|powershell) Shell type

FLAGS
  -r, --refresh-cache  Refresh cache (ignores displaying instructions)

DESCRIPTION
  Display autocomplete installation instructions.

EXAMPLES
  $ asyncapi autocomplete

  $ asyncapi autocomplete bash

  $ asyncapi autocomplete zsh

  $ asyncapi autocomplete powershell

  $ asyncapi autocomplete --refresh-cache
```

_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.40/src/commands/autocomplete/index.ts)_

## `asyncapi bundle`

Bundle one or multiple AsyncAPI Documents and their references together.

```
USAGE
  $ asyncapi bundle [-h] [-o <value>] [-b <value>] [-d <value>] [-x]

FLAGS
  -b, --base=<value>     Path to the file which will act as a base. This is required when some properties need to be
                         overwritten.
  -d, --baseDir=<value>  One relative/absolute path to directory relative to which paths to AsyncAPI Documents that
                         should be bundled will be resolved.
  -h, --help             Show CLI help.
  -o, --output=<value>   The output file name. Omitting this flag the result will be printed in the console.
  -x, --xOrigin          Pass this switch to generate properties "x-origin" that will contain historical values of
                         dereferenced "$ref"s.

DESCRIPTION
  Bundle one or multiple AsyncAPI Documents and their references together.

EXAMPLES
  $ asyncapi bundle ./asyncapi.yaml > final-asyncapi.yaml

  $ asyncapi bundle ./asyncapi.yaml --output final-asyncapi.yaml

  $ asyncapi bundle ./asyncapi.yaml ./features.yaml

  $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./main.yaml

  $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./main.yaml --xOrigin

  $ asyncapi bundle ./asyncapi.yaml -o final-asyncapi.yaml --base ../public-api/main.yaml --baseDir ./social-media/comments-service
```

_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/bundle.ts)_

## `asyncapi config`

CLI config settings

```
USAGE
  $ asyncapi config

DESCRIPTION
  CLI config settings
```

_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/config/index.ts)_

## `asyncapi config analytics`

Enable or disable analytics for metrics collection

```
USAGE
  $ asyncapi config analytics [-h] [-d] [-e] [-s]

FLAGS
  -d, --disable  disable analytics
  -e, --enable   enable analytics
  -h, --help     Show CLI help.
  -s, --status   show current status of analytics

DESCRIPTION
  Enable or disable analytics for metrics collection
```

_See code: [src/commands/config/analytics.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/config/analytics.ts)_

## `asyncapi config auth add PATTERN TOKEN`

Add an authentication config for resolving $ref files requiring HTTP Authorization.

```
USAGE
  $ asyncapi config auth add PATTERN TOKEN [-a <value>] [-h <value>...]

ARGUMENTS
  PATTERN  Glob pattern for matching protected URLs (e.g. github.com/org/repo/**/*.*)
  TOKEN    Authentication token or environment variable reference (prefix with $, e.g. $GITHUB_TOKEN)

FLAGS
  -a, --auth-type=<value>  Authentication type (default is "Bearer")
  -h, --header=<value>...  Additional header in key=value format; can be used multiple times

DESCRIPTION
  Add an authentication config for resolving $ref files requiring HTTP Authorization.
```

_See code: [src/commands/config/auth/add.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/config/auth/add.ts)_

## `asyncapi config context`

Manage short aliases for full paths to AsyncAPI documents

```
USAGE
  $ asyncapi config context

DESCRIPTION
  Manage short aliases for full paths to AsyncAPI documents
```

_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/config/context/index.ts)_

## `asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH`

Add a context to the store

```
USAGE
  $ asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH [-h] [-s]

ARGUMENTS
  CONTEXT-NAME    context name
  SPEC-FILE-PATH  file path of the spec file

FLAGS
  -h, --help         Show CLI help.
  -s, --set-current  Set context being added as the current context

DESCRIPTION
  Add a context to the store
```

_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/config/context/add.ts)_

## `asyncapi config context current`

Shows the current context that is being used

```
USAGE
  $ asyncapi config context current [-h]

FLAGS
  -h, --help  Show CLI help.

DESCRIPTION
  Shows the current context that is being used
```

_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/config/context/current.ts)_

## `asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH`

Edit a context in the store

```
USAGE
  $ asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH [-h]

ARGUMENTS
  CONTEXT-NAME        context name
  NEW-SPEC-FILE-PATH  file path of the spec file

FLAGS
  -h, --help  Show CLI help.

DESCRIPTION
  Edit a context in the store
```

_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/config/context/edit.ts)_

## `asyncapi config context init [CONTEXT-FILE-PATH]`

Initialize context

```
USAGE
  $ asyncapi config context init [CONTEXT-FILE-PATH] [-h]

ARGUMENTS
  [CONTEXT-FILE-PATH]  Specify directory in which context file should be created:
                       - current directory          : asyncapi config context init .(default)
                       - root of current repository : asyncapi config context init ./
                       - user's home directory      : asyncapi config context init ~`

FLAGS
  -h, --help  Show CLI help.

DESCRIPTION
  Initialize context
```

_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/config/context/init.ts)_

## `asyncapi config context list`

List all the stored contexts in the store

```
USAGE
  $ asyncapi config context list [-h]

FLAGS
  -h, --help  Show CLI help.

DESCRIPTION
  List all the stored contexts in the store
```

_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/config/context/list.ts)_

## `asyncapi config context remove CONTEXT-NAME`

Delete a context from the store

```
USAGE
  $ asyncapi config context remove CONTEXT-NAME [-h]

ARGUMENTS
  CONTEXT-NAME  Name of the context to delete

FLAGS
  -h, --help  Show CLI help.

DESCRIPTION
  Delete a context from the store
```

_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/config/context/remove.ts)_

## `asyncapi config context use CONTEXT-NAME`

Set a context as current

```
USAGE
  $ asyncapi config context use CONTEXT-NAME [-h]

ARGUMENTS
  CONTEXT-NAME  name of the saved context

FLAGS
  -h, --help  Show CLI help.

DESCRIPTION
  Set a context as current
```

_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/config/context/use.ts)_

## `asyncapi config versions`

Show versions of AsyncAPI tools used

```
USAGE
  $ asyncapi config versions [-h]

FLAGS
  -h, --help  Show CLI help.

DESCRIPTION
  Show versions of AsyncAPI tools used
```

_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/config/versions.ts)_

## `asyncapi convert [SPEC-FILE]`

Convert asyncapi documents older to newer versions or OpenAPI documents to AsyncAPI

```
USAGE
  $ asyncapi convert [SPEC-FILE] -f openapi|asyncapi [-h] [-o <value>] [-t <value>] [-p client|server]
    [--proxyHost <value>] [--proxyPort <value>]

ARGUMENTS
  [SPEC-FILE]  spec path, url, or context-name

FLAGS
  -f, --format=<option>         (required) [default: asyncapi] Specify the format to convert from (openapi or asyncapi)
                                <options: openapi|asyncapi>
  -h, --help                    Show CLI help.
  -o, --output=<value>          path to the file where the result is saved
  -p, --perspective=<option>    [default: server] Perspective to use when converting OpenAPI to AsyncAPI (client or
                                server). Note: This option is only applicable for OpenAPI to AsyncAPI conversions.
                                <options: client|server>
  -t, --target-version=<value>  [default: 3.1.0] asyncapi version to convert to
      --proxyHost=<value>       Name of the ProxyHost
      --proxyPort=<value>       Port number number for the proxyHost.

DESCRIPTION
  Convert asyncapi documents older to newer versions or OpenAPI documents to AsyncAPI
```

_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/convert.ts)_

## `asyncapi diff OLD NEW`

Find diff between two asyncapi files

```
USAGE
  $ asyncapi diff OLD NEW [-h] [-f json|yaml|yml|md] [-t breaking|non-breaking|unclassified|all]
    [--markdownSubtype json|yaml|yml] [-o <value>] [--no-error] [-w] [--log-diagnostics] [--diagnostics-format
    json|stylish|junit|html|text|teamcity|pretty|github-actions|sarif|code-climate|gitlab|markdown] [--fail-severity
    error|warn|info|hint] [-s <value>]

ARGUMENTS
  OLD  old spec path, URL or context-name
  NEW  new spec path, URL or context-name

FLAGS
  -f, --format=<option>              [default: yaml] format of the output
                                     <options: json|yaml|yml|md>
  -h, --help                         Show CLI help.
  -o, --overrides=<value>            path to JSON file containing the override properties
  -s, --save-output=<value>          The output file name. Omitting this flag the result will be printed in the console.
  -t, --type=<option>                [default: all] type of the output
                                     <options: breaking|non-breaking|unclassified|all>
  -w, --watch                        Enable watch mode
      --diagnostics-format=<option>  [default: stylish] format to use for validation diagnostics
                                     <options: json|stylish|junit|html|text|teamcity|pretty|github-actions|sarif|code-cl
                                     imate|gitlab|markdown>
      --fail-severity=<option>       [default: error] diagnostics of this level or above will trigger a failure exit
                                     code
                                     <options: error|warn|info|hint>
      --[no-]log-diagnostics         log validation diagnostics or not
      --markdownSubtype=<option>     the format of changes made to AsyncAPI document. It works only when diff is
                                     generated using md type. For example, when you specify subtype as json, then diff
                                     information in markdown is dumped as json structure.
                                     <options: json|yaml|yml>
      --no-error                     don't show error on breaking changes

DESCRIPTION
  Find diff between two asyncapi files
```

_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/diff.ts)_

## `asyncapi format [SPEC-FILE]`

Convert asyncapi documents from any format to yaml, yml or JSON

```
USAGE
  $ asyncapi format [SPEC-FILE] -f yaml|yml|json [-h] [-o <value>]

ARGUMENTS
  [SPEC-FILE]  spec path, url, or context-name

FLAGS
  -f, --format=<option>  (required) [default: json] Specify the format to convert to
                         <options: yaml|yml|json>
  -h, --help             Show CLI help.
  -o, --output=<value>   path to the file where the result is saved

DESCRIPTION
  Convert asyncapi documents from any format to yaml, yml or JSON
```

_See code: [src/commands/format.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/format.ts)_

## `asyncapi generate`

Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates.

```
USAGE
  $ asyncapi generate

DESCRIPTION
  Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates.
```

_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/generate/index.ts)_

## `asyncapi generate client LANGUAGE [ASYNCAPI]`

Generates clients baked-in AsyncAPI Generator. Available for: dart, java, javascript, python. If some language is not supported or you want to improve existing client, join us at https://github.com/asyncapi/generator

```
USAGE
  $ asyncapi generate client LANGUAGE [ASYNCAPI] [-h] [-d <value>...] [--no-interactive] [-i] [--debug] [-n
    <value>...] [-o <value>] [--force-write] [-w] [-p <value>...] [--map-base-url <value>] [--registry-url <value>]
    [--registry-auth <value>] [--registry-token <value>] [--proxyHost <value>] [--proxyPort <value>]

ARGUMENTS
  LANGUAGE    The language you want the client generated for. Available target languages: dart, java, javascript, python
  [ASYNCAPI]  - Local path, url or context-name pointing to AsyncAPI file

FLAGS
  -d, --disable-hook=<value>...  Disable a specific hook type or hooks from a given hook type
  -h, --help                     Show CLI help.
  -i, --install                  Installs the template and its dependencies (defaults to false)
  -n, --no-overwrite=<value>...  Glob or path of the file(s) to skip when regenerating
  -o, --output=<value>           Directory where to put the generated files (defaults to current directory)
  -p, --param=<value>...         Additional param to pass to templates
  -w, --watch                    Watches the template directory and the AsyncAPI document, and re-generate the files
                                 when changes occur. Ignores the output directory.
      --debug                    Enable more specific errors in the console
      --force-write              Force writing of the generated files to given directory even if it is a git repo with
                                 unstaged files or not empty dir (defaults to false)
      --map-base-url=<value>     Maps all schema references from base url to local folder
      --no-interactive           Disable interactive mode and run with the provided flags.
      --proxyHost=<value>        Name of the ProxyHost
      --proxyPort=<value>        Port number number for the proxyHost.
      --registry-auth=<value>    The registry username and password encoded with base64, formatted as username:password
      --registry-token=<value>   The npm registry authentication token, that can be passed instead of base64 encoded
                                 username and password
      --registry-url=<value>     [default: https://registry.npmjs.org] Specifies the URL of the private registry for
                                 fetching templates and dependencies

DESCRIPTION
  Generates clients baked-in AsyncAPI Generator. Available for: dart, java, javascript, python. If some language is not
  supported or you want to improve existing client, join us at https://github.com/asyncapi/generator

EXAMPLES
  $ asyncapi generate client javascript asyncapi.yaml --param version=1.0.0 singleFile=true --output ./docs --force-write
```

_See code: [src/commands/generate/client.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/generate/client.ts)_

## `asyncapi generate fromTemplate [ASYNCAPI] [TEMPLATE]`

Generates whatever you want using templates compatible with AsyncAPI Generator.

```
USAGE
  $ asyncapi generate fromTemplate [ASYNCAPI] [TEMPLATE] [-h] [-d <value>...] [--no-interactive] [-i] [--debug] [-n
    <value>...] [-o <value>] [--force-write] [-w] [-p <value>...] [--map-base-url <value>] [--registry-url <value>]
    [--registry-auth <value>] [--registry-token <value>] [--proxyHost <value>] [--proxyPort <value>]

ARGUMENTS
  [ASYNCAPI]  - Local path, url or context-name pointing to AsyncAPI file
  [TEMPLATE]  - Name of the generator template like for example @asyncapi/html-template or
              https://github.com/asyncapi/html-template

FLAGS
  -d, --disable-hook=<value>...  Disable a specific hook type or hooks from a given hook type
  -h, --help                     Show CLI help.
  -i, --install                  Installs the template and its dependencies (defaults to false)
  -n, --no-overwrite=<value>...  Glob or path of the file(s) to skip when regenerating
  -o, --output=<value>           Directory where to put the generated files (defaults to current directory)
  -p, --param=<value>...         Additional param to pass to templates
  -w, --watch                    Watches the template directory and the AsyncAPI document, and re-generate the files
                                 when changes occur. Ignores the output directory.
      --debug                    Enable more specific errors in the console
      --force-write              Force writing of the generated files to given directory even if it is a git repo with
                                 unstaged files or not empty dir (defaults to false)
      --map-base-url=<value>     Maps all schema references from base url to local folder
      --no-interactive           Disable interactive mode and run with the provided flags.
      --proxyHost=<value>        Name of the ProxyHost
      --proxyPort=<value>        Port number number for the proxyHost.
      --registry-auth=<value>    The registry username and password encoded with base64, formatted as username:password
      --registry-token=<value>   The npm registry authentication token, that can be passed instead of base64 encoded
                                 username and password
      --registry-url=<value>     [default: https://registry.npmjs.org] Specifies the URL of the private registry for
                                 fetching templates and dependencies

DESCRIPTION
  Generates whatever you want using templates compatible with AsyncAPI Generator.

EXAMPLES
  $ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write
```

_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/generate/fromTemplate.ts)_

## `asyncapi generate models LANGUAGE FILE`

Generates typed models

```
USAGE
  $ asyncapi generate models LANGUAGE FILE [-h] [-o <value>] [--packageName <value>] [--namespace <value>]
    [--tsModelType class|interface] [--tsEnumType enum|union] [--tsModuleSystem ESM|CJS] [--tsIncludeComments]
    [--tsExportType default|named] [--tsJsonBinPack] [--tsMarshalling] [--tsExampleInstance] [--tsRawPropertyNames]
    [--csharpAutoImplement] [--csharpNewtonsoft] [--csharpArrayType Array|List] [--csharpHashcode] [--csharpEqual]
    [--csharpSystemJson] [--goIncludeComments] [--goIncludeTags] [--javaIncludeComments] [--javaJackson]
    [--javaConstraints] [--javaArrayType Array|List] [--pyDantic] [--no-interactive] [--log-diagnostics]
    [--diagnostics-format
    json|stylish|junit|html|text|teamcity|pretty|github-actions|sarif|code-climate|gitlab|markdown] [--fail-severity
    error|warn|info|hint] [-s <value>] [--proxyHost <value>] [--proxyPort <value>]

ARGUMENTS
  LANGUAGE  (typescript|csharp|golang|java|javascript|dart|python|rust|kotlin|php|cplusplus|scala) The language you want
            the typed models generated for.
  FILE      Path or URL to the AsyncAPI document, or context-name

FLAGS
  -h, --help                         Show CLI help.
  -o, --output=<value>               The output directory where the models should be written to. Omitting this flag will
                                     write the models to `stdout`.
  -s, --save-output=<value>          The output file name. Omitting this flag the result will be printed in the console.
      --csharpArrayType=<option>     [default: Array] C# specific, define which type of array needs to be generated.
                                     <options: Array|List>
      --csharpAutoImplement          C# specific, define whether to generate auto-implemented properties or not.
      --csharpEqual                  C# specific, generate the models with the Equal method overwritten
      --csharpHashcode               C# specific, generate the models with the GetHashCode method overwritten
      --csharpNewtonsoft             C# specific, generate the models with newtonsoft serialization support
      --csharpSystemJson             C# specific, generate the models with System.Text.Json serialization support
      --diagnostics-format=<option>  [default: stylish] format to use for validation diagnostics
                                     <options: json|stylish|junit|html|text|teamcity|pretty|github-actions|sarif|code-cl
                                     imate|gitlab|markdown>
      --fail-severity=<option>       [default: error] diagnostics of this level or above will trigger a failure exit
                                     code
                                     <options: error|warn|info|hint>
      --goIncludeComments            Golang specific, if enabled add comments while generating models.
      --goIncludeTags                Golang specific, if enabled add tags while generating models.
      --javaArrayType=<option>       [default: Array] Java specific, define which type of array needs to be generated.
                                     <options: Array|List>
      --javaConstraints              Java specific, generate the models with constraints
      --javaIncludeComments          Java specific, if enabled add comments while generating models.
      --javaJackson                  Java specific, generate the models with Jackson serialization support
      --[no-]log-diagnostics         log validation diagnostics or not
      --namespace=<value>            C#, C++ and PHP specific, define the namespace to use for the generated models.
                                     This is required when language is `csharp`,`c++` or `php`.
      --no-interactive               Disable interactive mode and run with the provided flags.
      --packageName=<value>          Go, Java and Kotlin specific, define the package to use for the generated models.
                                     This is required when language is `go`, `java` or `kotlin`.
      --proxyHost=<value>            Name of the ProxyHost
      --proxyPort=<value>            Port number number for the proxyHost.
      --pyDantic                     Python specific, generate the Pydantic models.
      --tsEnumType=<option>          [default: enum] TypeScript specific, define which type of enums needs to be
                                     generated.
                                     <options: enum|union>
      --tsExampleInstance            Typescript specific, generate example of the model.
      --tsExportType=<option>        [default: default] TypeScript specific, define which type of export needs to be
                                     generated.
                                     <options: default|named>
      --tsIncludeComments            TypeScript specific, if enabled add comments while generating models.
      --tsJsonBinPack                TypeScript specific, define basic support for serializing to and from binary with
                                     jsonbinpack.
      --tsMarshalling                TypeScript specific, generate the models with marshalling functions.
      --tsModelType=<option>         [default: class] TypeScript specific, define which type of model needs to be
                                     generated.
                                     <options: class|interface>
      --tsModuleSystem=<option>      [default: ESM] TypeScript specific, define the module system to be used.
                                     <options: ESM|CJS>
      --tsRawPropertyNames           Typescript specific, generate the models using raw property names.

DESCRIPTION
  Generates typed models
```

_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/generate/models.ts)_

## `asyncapi new`

Create a new AsyncAPI project, specification files, or templates for clients and applications.

```
USAGE
  $ asyncapi new

DESCRIPTION
  Create a new AsyncAPI project, specification files, or templates for clients and applications.
```

_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/new/index.ts)_

## `asyncapi new file`

Creates a new asyncapi file

```
USAGE
  $ asyncapi new file [-h] [-n <value>] [-e <value>] [-s] [-p <value>] [--no-tty]

FLAGS
  -e, --example=<value>
      name of the example to use. Available examples are:
      - simple-asyncapi.yml
      - adeo-kafka-request-reply-asyncapi.yml
      - anyof-asyncapi.yml
      - application-headers-asyncapi.yml
      - correlation-id-asyncapi.yml
      - websocket-gemini-asyncapi.yml
      - gitter-streaming-asyncapi.yml
      - kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml
      - kraken-websocket-request-reply-multiple-channels-asyncapi.yml
      - mercure-asyncapi.yml
      - not-asyncapi.yml
      - operation-security-asyncapi.yml
      - oneof-asyncapi.yml
      - rpc-client-asyncapi.yml
      - rpc-server-asyncapi.yml
      - slack-rtm-asyncapi.yml
      - tutorial.yml
      - streetlights-kafka-asyncapi.yml
      - streetlights-operation-security-asyncapi.yml
      - streetlights-mqtt-asyncapi.yml

  -h, --help
      Show CLI help.

  -n, --file-name=<value>
      name of the file

  -p, --port=<value>
      port in which to start Studio

  -s, --studio
      open in Studio

  --no-tty
      do not use an interactive terminal

DESCRIPTION
  Creates a new asyncapi file

EXAMPLES
  $ asyncapi new	 - start creation of a file in interactive mode

  $ asyncapi new --file-name=my-asyncapi.yaml --example=default-example.yaml --no-tty	 - create a new file with a specific name, using one of the examples and without interactive mode
```

_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/new/file.ts)_

## `asyncapi new template`

Creates a new template

```
USAGE
  $ asyncapi new template [-h] [-n <value>] [-t <value>] [-f <value>] [--force-write]

FLAGS
  -f, --file=<value>      The path to the AsyncAPI file for generating a template.
  -h, --help              Show CLI help.
  -n, --name=<value>      [default: project] Name of the Project
  -t, --template=<value>  [default: default] Name of the Template
      --force-write       Force writing of the generated files to given directory even if it is a git repo with unstaged
                          files or not empty dir (defaults to false)

DESCRIPTION
  Creates a new template
```

_See code: [src/commands/new/template.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/new/template.ts)_

## `asyncapi optimize [SPEC-FILE]`

optimize asyncapi specification file

```
USAGE
  $ asyncapi optimize [SPEC-FILE] [-h] [-p
    remove-components|reuse-components|move-duplicates-to-components|move-all-to-components...] [-i schema...] [-o
    terminal|new-file|overwrite] [--no-tty] [--proxyHost <value>] [--proxyPort <value>]

ARGUMENTS
  [SPEC-FILE]  spec path, url, or context-name

FLAGS
  -h, --help                      Show CLI help.
  -i, --ignore=<option>...        [default: ] list of components to be ignored from the optimization process
                                  <options: schema>
  -o, --output=<option>           [default: terminal] select where you want the output.
                                  <options: terminal|new-file|overwrite>
  -p, --optimization=<option>...  [default: remove-components,reuse-components,move-duplicates-to-components,move-all-to
                                  -components] select the type of optimizations that you want to apply.
                                  <options: remove-components|reuse-components|move-duplicates-to-components|move-all-to
                                  -components>
      --no-tty                    do not use an interactive terminal
      --proxyHost=<value>         Name of the ProxyHost
      --proxyPort=<value>         Port number number for the proxyHost.

DESCRIPTION
  optimize asyncapi specification file

EXAMPLES
  $ asyncapi optimize ./asyncapi.yaml

  $ asyncapi optimize ./asyncapi.yaml --no-tty

  $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components --optimization=reuse-components --optimization=move-all-to-components --no-tty

  $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components --output=terminal --no-tty

  $ asyncapi optimize ./asyncapi.yaml --ignore=schema
```

_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/optimize.ts)_

## `asyncapi pretty SPEC-FILE`

Beautify the AsyncAPI spec file (indentation, styling) in place or output the formatted spec to a new file.

```
USAGE
  $ asyncapi pretty SPEC-FILE [-o <value>]

ARGUMENTS
  SPEC-FILE  spec path, url, or context-name

FLAGS
  -o, --output=<value>  Output file path

DESCRIPTION
  Beautify the AsyncAPI spec file (indentation, styling) in place or output the formatted spec to a new file.

EXAMPLES
  $ asyncapi pretty ./asyncapi.yaml

  $ asyncapi pretty ./asyncapi.yaml --output formatted-asyncapi.yaml
```

_See code: [src/commands/pretty.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/pretty.ts)_

## `asyncapi start`

Starts AsyncAPI-related services. Currently, it supports launching the AsyncAPI Studio

```
USAGE
  $ asyncapi start

DESCRIPTION
  Starts AsyncAPI-related services. Currently, it supports launching the AsyncAPI Studio
```

_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/start/index.ts)_

## `asyncapi start api`

starts the AsyncAPI server API.

```
USAGE
  $ asyncapi start api [-h] [-m development|production|test] [-p <value>]

FLAGS
  -h, --help           Show CLI help.
  -m, --mode=<option>  [default: production] mode in which to start the API
                       <options: development|production|test>
  -p, --port=<value>   port in which to start the API

DESCRIPTION
  starts the AsyncAPI server API.
```

_See code: [src/commands/start/api.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/start/api.ts)_

## `asyncapi start preview SPEC-FILE`

starts a new local instance of Studio in minimal state bundling all the refs of the schema file and with no editing allowed.

```
USAGE
  $ asyncapi start preview SPEC-FILE [-h] [-p <value>] [-b <value>] [-d <value>] [-x] [-l] [-B]

ARGUMENTS
  SPEC-FILE  the path to the file to be opened with studio or context name

FLAGS
  -B, --noBrowser        Pass this to not open browser automatically upon running the command
  -b, --base=<value>     Path to the file which will act as a base. This is required when some properties need to be
                         overwritten while bundling with the file.
  -d, --baseDir=<value>  One relative/absolute path to directory relative to which paths to AsyncAPI Documents that
                         should be bundled will be resolved.
  -h, --help             Show CLI help.
  -l, --suppressLogs     Pass this to suppress the detiled error logs.
  -p, --port=<value>     port in which to start Studio in the preview mode
  -x, --xOrigin          Pass this switch to generate properties "x-origin" that will contain historical values of
                         dereferenced "$ref"s.

DESCRIPTION
  starts a new local instance of Studio in minimal state bundling all the refs of the schema file and with no editing
  allowed.
```

_See code: [src/commands/start/preview.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/start/preview.ts)_

## `asyncapi start studio [SPEC-FILE]`

starts a new local instance of Studio

```
USAGE
  $ asyncapi start studio [SPEC-FILE] [-h] [-f <value>] [-p <value>] [--no-interactive] [-B]

ARGUMENTS
  [SPEC-FILE]  spec path, url, or context-name

FLAGS
  -B, --noBrowser       Pass this to not open browser automatically upon running the command
  -f, --file=<value>    path to the AsyncAPI file to link with Studio
  -h, --help            Show CLI help.
  -p, --port=<value>    port in which to start Studio
      --no-interactive  disable prompts for this command which asks for file path if not passed via the arguments.

DESCRIPTION
  starts a new local instance of Studio
```

_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/start/studio.ts)_

## `asyncapi validate [SPEC-FILE]`

validate asyncapi file

```
USAGE
  $ asyncapi validate [SPEC-FILE] [-h] [-w] [--log-diagnostics] [--diagnostics-format
    json|stylish|junit|html|text|teamcity|pretty|github-actions|sarif|code-climate|gitlab|markdown] [--fail-severity
    error|warn|info|hint] [-s <value>] [--score] [--suppressWarnings <value>...] [--suppressAllWarnings] [--proxyHost
    <value>] [--proxyPort <value>]

ARGUMENTS
  [SPEC-FILE]  spec path, url, or context-name

FLAGS
  -h, --help                         Show CLI help.
  -s, --save-output=<value>          The output file name. Omitting this flag the result will be printed in the console.
  -w, --watch                        Enable watch mode
      --diagnostics-format=<option>  [default: stylish] format to use for validation diagnostics
                                     <options: json|stylish|junit|html|text|teamcity|pretty|github-actions|sarif|code-cl
                                     imate|gitlab|markdown>
      --fail-severity=<option>       [default: error] diagnostics of this level or above will trigger a failure exit
                                     code
                                     <options: error|warn|info|hint>
      --[no-]log-diagnostics         log validation diagnostics or not
      --proxyHost=<value>            Name of the ProxyHost
      --proxyPort=<value>            Port number number for the proxyHost.
      --score                        Compute the score of the AsyncAPI document. Scoring is based on whether the
                                     document has description, license, server and/or channels.
      --suppressAllWarnings          Suppress all warnings from the validation output.
      --suppressWarnings=<value>...  List of warning codes to suppress from the validation output.

DESCRIPTION
  validate asyncapi file
```

_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v5.0.7/src/commands/validate.ts)_
<!-- commandsstop -->
