Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update generated docs #601

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 32 additions & 35 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,42 @@ title: 'Usage'
weight: 40
---

The AsyncAPI CLI makes it easier to work with AsyncAPI documents.
<!--

To get **help**, run this command in your terminal:
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 -

```sh
asyncapi --help
```
* 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.

It should print something similar to this:

```sh
All in one CLI for all AsyncAPI tools
# Usage

<!-- usage -->
```sh-session
$ npm install -g @asyncapi/cli
$ asyncapi COMMAND
running command...
$ asyncapi (--version)
@asyncapi/cli/0.45.0 linux-x64 node-v18.16.0
$ asyncapi --help [COMMAND]
USAGE
$ asyncapi [COMMAND]

TOPICS
config CLI config settings
generate Generate models and template
start Start AsyncAPI studio

COMMANDS
config access configs
diff find diff between two AsyncAPI files
optimize optimizes your AsyncAPI file by removing unused components, re-using duplicates etc.
new creates a new AsyncAPI file
start starts a new local instance of Studio
validate validate an AsyncAPI file
generate generate all kinds of stuff
models generate all the typed models for the message payloads defined in the AsyncAPI file
typescript generate the models for TypeScript
csharp generate the models for C#
golang generate the models for Go
java generate the models for Java
javascript generate the models for JavaScript
dart generate the models for Dart
rust generate the models for Rust
kotlin generate the models for Kotlin
php generate the models for PHP
cplusplus generate the models for C++
fromTemplate generate whatever you want using templates compatible with AsyncAPI Generator
$ asyncapi COMMAND
...
```
<!-- usagestop -->

# Commands

<!-- commands -->

<!-- commandsstop -->