The AsyncAPI CLI makes it easier to work with AsyncAPI documents.
Usage
1$ npm install -g @asyncapi/cli2$ asyncapi COMMAND3running command...4$ asyncapi (--version|--v)5@asyncapi/cli/3.2.0 linux-x64 node-v18.20.86$ asyncapi --help [COMMAND]7USAGE8 $ asyncapi COMMAND9...
Commands
asyncapi autocomplete [SHELL]asyncapi bundleasyncapi configasyncapi config analyticsasyncapi config auth add PATTERN TOKENasyncapi config contextasyncapi config context add CONTEXT-NAME SPEC-FILE-PATHasyncapi config context currentasyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATHasyncapi config context init [CONTEXT-FILE-PATH]asyncapi config context listasyncapi config context remove CONTEXT-NAMEasyncapi config context use CONTEXT-NAMEasyncapi config versionsasyncapi convert [SPEC-FILE]asyncapi diff OLD NEWasyncapi format [SPEC-FILE]asyncapi generateasyncapi generate fromTemplate [ASYNCAPI] [TEMPLATE]asyncapi generate models LANGUAGE FILEasyncapi newasyncapi new fileasyncapi new gleeasyncapi new templateasyncapi optimize [SPEC-FILE]asyncapi pretty SPEC-FILEasyncapi startasyncapi start preview SPEC-FILEasyncapi start studio [SPEC-FILE]asyncapi validate [SPEC-FILE]
asyncapi autocomplete [SHELL]
Display autocomplete installation instructions.
1USAGE2 $ asyncapi autocomplete [SHELL] [-r]34ARGUMENTS5 SHELL (zsh|bash|powershell) Shell type67FLAGS8 -r, --refresh-cache Refresh cache (ignores displaying instructions)910DESCRIPTION11 Display autocomplete installation instructions.1213EXAMPLES14 $ asyncapi autocomplete1516 $ asyncapi autocomplete bash1718 $ asyncapi autocomplete zsh1920 $ asyncapi autocomplete powershell2122 $ asyncapi autocomplete --refresh-cache
See code: @oclif/plugin-autocomplete
asyncapi bundle
Bundle one or multiple AsyncAPI Documents and their references together.
1USAGE2 $ asyncapi bundle [-h] [-o <value>] [-b <value>] [-d <value>] [-x]34FLAGS5 -b, --base=<value> Path to the file which will act as a base. This is required when some properties need to be6 overwritten.7 -d, --baseDir=<value> One relative/absolute path to directory relative to which paths to AsyncAPI Documents that8 should be bundled will be resolved.9 -h, --help Show CLI help.10 -o, --output=<value> The output file name. Omitting this flag the result will be printed in the console.11 -x, --xOrigin Pass this switch to generate properties "x-origin" that will contain historical values of12 dereferenced "$ref"s.1314DESCRIPTION15 Bundle one or multiple AsyncAPI Documents and their references together.1617EXAMPLES18 $ asyncapi bundle ./asyncapi.yaml > final-asyncapi.yaml1920 $ asyncapi bundle ./asyncapi.yaml --output final-asyncapi.yaml2122 $ asyncapi bundle ./asyncapi.yaml ./features.yaml2324 $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./main.yaml2526 $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./main.yaml --xOrigin2728 $ asyncapi bundle ./asyncapi.yaml -o final-asyncapi.yaml --base ../public-api/main.yaml --baseDir ./social-media/comments-service
See code: src/commands/bundle.ts
asyncapi config
CLI config settings
1USAGE2 $ asyncapi config34DESCRIPTION5 CLI config settings
See code: src/commands/config/index.ts
asyncapi config analytics
Enable or disable analytics for metrics collection
1USAGE2 $ asyncapi config analytics [-h] [-d] [-e] [-s]34FLAGS5 -d, --disable disable analytics6 -e, --enable enable analytics7 -h, --help Show CLI help.8 -s, --status show current status of analytics910DESCRIPTION11 Enable or disable analytics for metrics collection
See code: src/commands/config/analytics.ts
asyncapi config auth add PATTERN TOKEN
Add an authentication config for resolving $ref files requiring HTTP Authorization.
1USAGE2 $ asyncapi config auth add PATTERN TOKEN [-a <value>] [-h <value>...]34ARGUMENTS5 PATTERN Glob pattern for matching protected URLs (e.g. github.com/org/repo/**/*.*)6 TOKEN Authentication token or environment variable reference (prefix with $, e.g. $GITHUB_TOKEN)78FLAGS9 -a, --auth-type=<value> Authentication type (default is "Bearer")10 -h, --header=<value>... Additional headers in key=value format1112DESCRIPTION13 Add an authentication config for resolving $ref files requiring HTTP Authorization.1415EXAMPLES16 $ asyncapi config auth add "https://github.com/org/repo/**/*" "ghp_XuYi7ZWQWjmrJpY2Kz3ET"1718 $ asyncapi config auth add "https://api.github.com/repos/org/repo/**/*" "$GITHUB_TOKEN"1920 $ asyncapi config auth add "https://private-registry.com/**/*" "my-token" --auth-type="Token"2122 $ asyncapi config auth add "https://api.example.com/**/*" "token123" --header="X-API-Key=abc123" --header="User-Agent=MyApp/1.0"
See code: src/commands/config/auth/add.ts
asyncapi config context
Manage short aliases for full paths to AsyncAPI documents
1USAGE2 $ asyncapi config context34DESCRIPTION5 Manage short aliases for full paths to AsyncAPI documents
See code: src/commands/config/context/index.ts
asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH
Add a context to the store
1USAGE2 $ asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH [-h] [-s]34ARGUMENTS5 CONTEXT-NAME context name6 SPEC-FILE-PATH file path of the spec file78FLAGS9 -h, --help Show CLI help.10 -s, --set-current Set context being added as the current context1112DESCRIPTION13 Add a context to the store
See code: src/commands/config/context/add.ts
asyncapi config context current
Shows the current context that is being used
1USAGE2 $ asyncapi config context current [-h]34FLAGS5 -h, --help Show CLI help.67DESCRIPTION8 Shows the current context that is being used
See code: src/commands/config/context/current.ts
asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH
Edit a context in the store
1USAGE2 $ asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH [-h]34ARGUMENTS5 CONTEXT-NAME context name6 NEW-SPEC-FILE-PATH file path of the spec file78FLAGS9 -h, --help Show CLI help.1011DESCRIPTION12 Edit a context in the store
See code: src/commands/config/context/edit.ts
asyncapi config context init [CONTEXT-FILE-PATH]
Initialize context
1USAGE2 $ asyncapi config context init [CONTEXT-FILE-PATH] [-h]34ARGUMENTS5 CONTEXT-FILE-PATH Specify directory in which context file should be created:6 - current directory : asyncapi config context init .(default)7 - root of current repository : asyncapi config context init ./8 - user's home directory : asyncapi config context init ~`910FLAGS11 -h, --help Show CLI help.1213DESCRIPTION14 Initialize context
See code: src/commands/config/context/init.ts
asyncapi config context list
List all the stored contexts in the store
1USAGE2 $ asyncapi config context list [-h]34FLAGS5 -h, --help Show CLI help.67DESCRIPTION8 List all the stored contexts in the store
See code: src/commands/config/context/list.ts
asyncapi config context remove CONTEXT-NAME
Delete a context from the store
1USAGE2 $ asyncapi config context remove CONTEXT-NAME [-h]34ARGUMENTS5 CONTEXT-NAME Name of the context to delete67FLAGS8 -h, --help Show CLI help.910DESCRIPTION11 Delete a context from the store
See code: src/commands/config/context/remove.ts
asyncapi config context use CONTEXT-NAME
Set a context as current
1USAGE2 $ asyncapi config context use CONTEXT-NAME [-h]34ARGUMENTS5 CONTEXT-NAME name of the saved context67FLAGS8 -h, --help Show CLI help.910DESCRIPTION11 Set a context as current
See code: src/commands/config/context/use.ts
asyncapi config versions
Show versions of AsyncAPI tools used
1USAGE2 $ asyncapi config versions [-h]34FLAGS5 -h, --help Show CLI help.67DESCRIPTION8 Show versions of AsyncAPI tools used
See code: src/commands/config/versions.ts
asyncapi convert [SPEC-FILE]
Convert asyncapi documents older to newer versions or OpenAPI/postman-collection documents to AsyncAPI
1USAGE2 $ asyncapi convert [SPEC-FILE] -f openapi|asyncapi|postman-collection [-h] [-o <value>] [-t <value>] [-p3 client|server] [--proxyHost <value>] [--proxyPort <value>]45ARGUMENTS6 SPEC-FILE spec path, url, or context-name78FLAGS9 -f, --format=<option> (required) [default: asyncapi] Specify the format to convert from (openapi or asyncapi)10 <options: openapi|asyncapi|postman-collection>11 -h, --help Show CLI help.12 -o, --output=<value> path to the file where the result is saved13 -p, --perspective=<option> [default: server] Perspective to use when converting OpenAPI to AsyncAPI (client or14 server). Note: This option is only applicable for OpenAPI to AsyncAPI conversions.15 <options: client|server>16 -t, --target-version=<value> [default: 3.0.0] asyncapi version to convert to17 --proxyHost=<value> Name of the ProxyHost18 --proxyPort=<value> Port number number for the proxyHost.1920DESCRIPTION21 Convert asyncapi documents older to newer versions or OpenAPI/postman-collection documents to AsyncAPI
See code: src/commands/convert.ts
asyncapi diff OLD NEW
Find diff between two asyncapi files
1USAGE2 $ asyncapi diff OLD NEW [-h] [-f json|yaml|yml|md] [-t breaking|non-breaking|unclassified|all]3 [--markdownSubtype json|yaml|yml] [-o <value>] [--no-error] [-w] [--log-diagnostics] [--diagnostics-format4 json|stylish|junit|html|text|teamcity|pretty] [--fail-severity error|warn|info|hint] [-o <value>]56ARGUMENTS7 OLD old spec path, URL or context-name8 NEW new spec path, URL or context-name910FLAGS11 -f, --format=<option> [default: yaml] format of the output12 <options: json|yaml|yml|md>13 -h, --help Show CLI help.14 -o, --output=<value> The output file name. Omitting this flag the result will be printed in the console.15 -o, --overrides=<value> path to JSON file containing the override properties16 -t, --type=<option> [default: all] type of the output17 <options: breaking|non-breaking|unclassified|all>18 -w, --watch Enable watch mode19 --diagnostics-format=<option> [default: stylish] format to use for validation diagnostics20 <options: json|stylish|junit|html|text|teamcity|pretty>21 --fail-severity=<option> [default: error] diagnostics of this level or above will trigger a failure exit22 code23 <options: error|warn|info|hint>24 --[no-]log-diagnostics log validation diagnostics or not25 --markdownSubtype=<option> the format of changes made to AsyncAPI document. It works only when diff is26 generated using md type. For example, when you specify subtype as json, then diff27 information in markdown is dumped as json structure.28 <options: json|yaml|yml>29 --no-error don't show error on breaking changes3031DESCRIPTION32 Find diff between two asyncapi files
See code: src/commands/diff.ts
asyncapi format [SPEC-FILE]
Convert asyncapi documents from any format to yaml, yml or JSON
1USAGE2 $ asyncapi format [SPEC-FILE] -f yaml|yml|json [-h] [-o <value>]34ARGUMENTS5 SPEC-FILE spec path, url, or context-name67FLAGS8 -f, --format=<option> (required) [default: json] Specify the format to convert to9 <options: yaml|yml|json>10 -h, --help Show CLI help.11 -o, --output=<value> path to the file where the result is saved1213DESCRIPTION14 Convert asyncapi documents from any format to yaml, yml or JSON
See code: src/commands/format.ts
asyncapi generate
Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates.
1USAGE2 $ asyncapi generate34DESCRIPTION5 Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates.
See code: src/commands/generate/index.ts
asyncapi generate fromTemplate [ASYNCAPI] [TEMPLATE]
Generates whatever you want using templates compatible with AsyncAPI Generator.
1USAGE2 $ asyncapi generate fromTemplate [ASYNCAPI] [TEMPLATE] [-h] [-d <value>...] [--no-interactive] [-i] [--debug] [-n3 <value>...] [-o <value>] [--force-write] [-w] [-p <value>...] [--map-base-url <value>] [--registry-url <value>]4 [--registry-auth <value>] [--registry-token <value>] [--use-new-generator] [--proxyHost <value>] [--proxyPort5 <value>]67ARGUMENTS8 ASYNCAPI - Local path, url or context-name pointing to AsyncAPI file9 TEMPLATE - Name of the generator template like for example @asyncapi/html-template or10 https://github.com/asyncapi/html-template1112FLAGS13 -d, --disable-hook=<value>... Disable a specific hook type or hooks from a given hook type14 -h, --help Show CLI help.15 -i, --install Installs the template and its dependencies (defaults to false)16 -n, --no-overwrite=<value>... Glob or path of the file(s) to skip when regenerating17 -o, --output=<value> Directory where to put the generated files (defaults to current directory)18 -p, --param=<value>... Additional param to pass to templates19 -w, --watch Watches the template directory and the AsyncAPI document, and re-generate the files20 when changes occur. Ignores the output directory.21 --debug Enable more specific errors in the console22 --force-write Force writing of the generated files to given directory even if it is a git repo with23 unstaged files or not empty dir (defaults to false)24 --map-base-url=<value> Maps all schema references from base url to local folder25 --no-interactive Disable interactive mode and run with the provided flags.26 --proxyHost=<value> Name of the ProxyHost27 --proxyPort=<value> Port number number for the proxyHost.28 --registry-auth=<value> The registry username and password encoded with base64, formatted as username:password29 --registry-token=<value> The npm registry authentication token, that can be passed instead of base64 encoded30 username and password31 --registry-url=<value> [default: https://registry.npmjs.org] Specifies the URL of the private registry for32 fetching templates and dependencies33 --use-new-generator Use v2 generator, for generating from newer templates3435DESCRIPTION36 Generates whatever you want using templates compatible with AsyncAPI Generator.3738EXAMPLES39 $ 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
asyncapi generate models LANGUAGE FILE
Generates typed models
1USAGE2 $ asyncapi generate models LANGUAGE FILE [-h] [-o <value>] [--packageName <value>] [--namespace <value>]3 [--tsModelType class|interface] [--tsEnumType enum|union] [--tsModuleSystem ESM|CJS] [--tsIncludeComments]4 [--tsExportType default|named] [--tsJsonBinPack] [--tsMarshalling] [--tsExampleInstance] [--tsRawPropertyNames]5 [--csharpAutoImplement] [--csharpNewtonsoft] [--csharpArrayType Array|List] [--csharpHashcode] [--csharpEqual]6 [--csharpSystemJson] [--goIncludeComments] [--goIncludeTags] [--javaIncludeComments] [--javaJackson]7 [--javaConstraints] [--javaArrayType Array|List] [--pyDantic] [--no-interactive] [--log-diagnostics]8 [--diagnostics-format json|stylish|junit|html|text|teamcity|pretty] [--fail-severity error|warn|info|hint]9 [--proxyHost <value>] [--proxyPort <value>]1011ARGUMENTS12 LANGUAGE (typescript|csharp|golang|java|javascript|dart|python|rust|kotlin|php|cplusplus|scala) The language you want13 the typed models generated for.14 FILE Path or URL to the AsyncAPI document, or context-name1516FLAGS17 -h, --help Show CLI help.18 -o, --output=<value> The output file name. Omitting this flag the result will be printed in the console.19 --csharpArrayType=<option> [default: Array] C# specific, define which type of array needs to be generated.20 <options: Array|List>21 --csharpAutoImplement C# specific, define whether to generate auto-implemented properties or not.22 --csharpEqual C# specific, generate the models with the Equal method overwritten23 --csharpHashcode C# specific, generate the models with the GetHashCode method overwritten24 --csharpNewtonsoft C# specific, generate the models with newtonsoft serialization support25 --csharpSystemJson C# specific, generate the models with System.Text.Json serialization support26 --diagnostics-format=<option> [default: stylish] format to use for validation diagnostics27 <options: json|stylish|junit|html|text|teamcity|pretty>28 --fail-severity=<option> [default: error] diagnostics of this level or above will trigger a failure exit29 code30 <options: error|warn|info|hint>31 --goIncludeComments Golang specific, if enabled add comments while generating models.32 --goIncludeTags Golang specific, if enabled add tags while generating models.33 --javaArrayType=<option> [default: Array] Java specific, define which type of array needs to be generated.34 <options: Array|List>35 --javaConstraints Java specific, generate the models with constraints36 --javaIncludeComments Java specific, if enabled add comments while generating models.37 --javaJackson Java specific, generate the models with Jackson serialization support38 --[no-]log-diagnostics log validation diagnostics or not39 --namespace=<value> C#, C++ and PHP specific, define the namespace to use for the generated models.40 This is required when language is `csharp`,`c++` or `php`.41 --no-interactive Disable interactive mode and run with the provided flags.42 --packageName=<value> Go, Java and Kotlin specific, define the package to use for the generated models.43 This is required when language is `go`, `java` or `kotlin`.44 --proxyHost=<value> Name of the ProxyHost45 --proxyPort=<value> Port number number for the proxyHost.46 --pyDantic Python specific, generate the Pydantic models.47 --tsEnumType=<option> [default: enum] TypeScript specific, define which type of enums needs to be48 generated.49 <options: enum|union>50 --tsExampleInstance Typescript specific, generate example of the model.51 --tsExportType=<option> [default: default] TypeScript specific, define which type of export needs to be52 generated.53 <options: default|named>54 --tsIncludeComments TypeScript specific, if enabled add comments while generating models.55 --tsJsonBinPack TypeScript specific, define basic support for serializing to and from binary with56 jsonbinpack.57 --tsMarshalling TypeScript specific, generate the models with marshalling functions.58 --tsModelType=<option> [default: class] TypeScript specific, define which type of model needs to be59 generated.60 <options: class|interface>61 --tsModuleSystem=<option> [default: ESM] TypeScript specific, define the module system to be used.62 <options: ESM|CJS>63 --tsRawPropertyNames Typescript specific, generate the models using raw property names.6465DESCRIPTION66 Generates typed models
See code: src/commands/generate/models.ts
asyncapi new
Create a new AsyncAPI project, specification files, or templates for clients and applications.
1USAGE2 $ asyncapi new34DESCRIPTION5 Create a new AsyncAPI project, specification files, or templates for clients and applications.
See code: src/commands/new/index.ts
asyncapi new file
Creates a new asyncapi file
1USAGE2 $ asyncapi new file [-h] [-n <value>] [-e <value>] [-s] [-p <value>] [--no-tty]34FLAGS5 -e, --example=<value>6 name of the example to use. Available examples are:7 - simple-asyncapi.yml8 - adeo-kafka-request-reply-asyncapi.yml9 - anyof-asyncapi.yml10 - application-headers-asyncapi.yml11 - correlation-id-asyncapi.yml12 - websocket-gemini-asyncapi.yml13 - gitter-streaming-asyncapi.yml14 - kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml15 - kraken-websocket-request-reply-multiple-channels-asyncapi.yml16 - mercure-asyncapi.yml17 - not-asyncapi.yml18 - operation-security-asyncapi.yml19 - oneof-asyncapi.yml20 - rpc-client-asyncapi.yml21 - rpc-server-asyncapi.yml22 - slack-rtm-asyncapi.yml23 - tutorial.yml24 - streetlights-kafka-asyncapi.yml25 - streetlights-operation-security-asyncapi.yml26 - streetlights-mqtt-asyncapi.yml2728 -h, --help29 Show CLI help.3031 -n, --file-name=<value>32 name of the file3334 -p, --port=<value>35 port in which to start Studio3637 -s, --studio38 open in Studio3940 --no-tty41 do not use an interactive terminal4243DESCRIPTION44 Creates a new asyncapi file4546EXAMPLES47 $ asyncapi new - start creation of a file in interactive mode4849 $ 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
asyncapi new glee
Creates a new Glee project
1USAGE2 $ asyncapi new glee [-h] [-n <value>] [-t <value>] [-f <value>] [--force-write]34FLAGS5 -f, --file=<value> The path to the AsyncAPI file for generating a Glee project.6 -h, --help Show CLI help.7 -n, --name=<value> [default: project] Name of the Project8 -t, --template=<value> [default: default] Name of the Template9 --force-write Force writing of the generated files to given directory even if it is a git repo with unstaged10 files or not empty dir (defaults to false)1112DESCRIPTION13 Creates a new Glee project
See code: src/commands/new/glee.ts
asyncapi new template
Creates a new template
1USAGE2 $ asyncapi new template [-h] [-n <value>] [-t <value>] [-f <value>] [--force-write]34FLAGS5 -f, --file=<value> The path to the AsyncAPI file for generating a template.6 -h, --help Show CLI help.7 -n, --name=<value> [default: project] Name of the Project8 -t, --template=<value> [default: default] Name of the Template9 --force-write Force writing of the generated files to given directory even if it is a git repo with unstaged10 files or not empty dir (defaults to false)1112DESCRIPTION13 Creates a new template
See code: src/commands/new/template.ts
asyncapi optimize [SPEC-FILE]
optimize asyncapi specification file
1USAGE2 $ asyncapi optimize [SPEC-FILE] [-h] [-p3 remove-components|reuse-components|move-duplicates-to-components|move-all-to-components...] [-i schema...] [-o4 terminal|new-file|overwrite] [--no-tty] [--proxyHost <value>] [--proxyPort <value>]56ARGUMENTS7 SPEC-FILE spec path, url, or context-name89FLAGS10 -h, --help Show CLI help.11 -i, --ignore=<option>... [default: ] list of components to be ignored from the optimization process12 <options: schema>13 -o, --output=<option> [default: terminal] select where you want the output.14 <options: terminal|new-file|overwrite>15 -p, --optimization=<option>... [default: remove-components,reuse-components,move-duplicates-to-components,move-all-to16 -components] select the type of optimizations that you want to apply.17 <options: remove-components|reuse-components|move-duplicates-to-components|move-all-to18 -components>19 --no-tty do not use an interactive terminal20 --proxyHost=<value> Name of the ProxyHost21 --proxyPort=<value> Port number number for the proxyHost.2223DESCRIPTION24 optimize asyncapi specification file2526EXAMPLES27 $ asyncapi optimize ./asyncapi.yaml2829 $ asyncapi optimize ./asyncapi.yaml --no-tty3031 $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components --optimization=reuse-components --optimization=move-all-to-components --no-tty3233 $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components --output=terminal --no-tty3435 $ asyncapi optimize ./asyncapi.yaml --ignore=schema
See code: 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.
1USAGE2 $ asyncapi pretty SPEC-FILE [-o <value>]34ARGUMENTS5 SPEC-FILE spec path, url, or context-name67FLAGS8 -o, --output=<value> Output file path910DESCRIPTION11 Beautify the AsyncAPI spec file (indentation, styling) in place or output the formatted spec to a new file.1213EXAMPLES14 $ asyncapi pretty ./asyncapi.yaml1516 $ asyncapi pretty ./asyncapi.yaml --output formatted-asyncapi.yaml
See code: src/commands/pretty.ts
asyncapi start
Starts AsyncAPI-related services. Currently, it supports launching the AsyncAPI Studio
1USAGE2 $ asyncapi start34DESCRIPTION5 Starts AsyncAPI-related services. Currently, it supports launching the AsyncAPI Studio
See code: src/commands/start/index.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.
1USAGE2 $ asyncapi start preview SPEC-FILE [-h] [-p <value>] [-b <value>] [-d <value>] [-x] [-l]34ARGUMENTS5 SPEC-FILE the path to the file to be opened with studio or context name67FLAGS8 -b, --base=<value> Path to the file which will act as a base. This is required when some properties need to be9 overwritten while bundling with the file.10 -d, --baseDir=<value> One relative/absolute path to directory relative to which paths to AsyncAPI Documents that11 should be bundled will be resolved.12 -h, --help Show CLI help.13 -l, --suppressLogs Pass this to suppress the detiled error logs.14 -p, --port=<value> port in which to start Studio in the preview mode15 -x, --xOrigin Pass this switch to generate properties "x-origin" that will contain historical values of16 dereferenced "$ref"s.1718DESCRIPTION19 starts a new local instance of Studio in minimal state bundling all the refs of the schema file and with no editing20 allowed.
See code: src/commands/start/preview.ts
asyncapi start studio [SPEC-FILE]
starts a new local instance of Studio
1USAGE2 $ asyncapi start studio [SPEC-FILE] [-h] [-f <value>] [-p <value>] [--no-interactive]34ARGUMENTS5 SPEC-FILE spec path, url, or context-name67FLAGS8 -f, --file=<value> path to the AsyncAPI file to link with Studio9 -h, --help Show CLI help.10 -p, --port=<value> port in which to start Studio11 --no-interactive disable prompts for this command which asks for file path if not passed via the arguments.1213DESCRIPTION14 starts a new local instance of Studio
See code: src/commands/start/studio.ts
asyncapi validate [SPEC-FILE]
validate asyncapi file
1USAGE2 $ asyncapi validate [SPEC-FILE] [-h] [-w] [--log-diagnostics] [--diagnostics-format3 json|stylish|junit|html|text|teamcity|pretty] [--fail-severity error|warn|info|hint] [-o <value>] [--score]4 [--suppressWarnings <value>...] [--suppressAllWarnings] [--proxyHost <value>] [--proxyPort <value>]56ARGUMENTS7 SPEC-FILE spec path, url, or context-name89FLAGS10 -h, --help Show CLI help.11 -o, --output=<value> The output file name. Omitting this flag the result will be printed in the console.12 -w, --watch Enable watch mode13 --diagnostics-format=<option> [default: stylish] format to use for validation diagnostics14 <options: json|stylish|junit|html|text|teamcity|pretty>15 --fail-severity=<option> [default: error] diagnostics of this level or above will trigger a failure exit16 code17 <options: error|warn|info|hint>18 --[no-]log-diagnostics log validation diagnostics or not19 --proxyHost=<value> Name of the ProxyHost20 --proxyPort=<value> Port number number for the proxyHost.21 --score Compute the score of the AsyncAPI document. Scoring is based on whether the22 document has description, license, server and/or channels.23 --suppressAllWarnings Suppress all warnings from the validation output.24 --suppressWarnings=<value>... List of warning codes to suppress from the validation output.2526DESCRIPTION27 validate asyncapi file
See code: src/commands/validate.ts