From 2130f979d7ac83d40d5fbf877684a7e493e515e3 Mon Sep 17 00:00:00 2001 From: Arya Gupta Date: Sat, 15 Jul 2023 12:00:05 +0530 Subject: [PATCH] docs: add instructions for using AsyncAPI CLI (#433) --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5a5ee832a..6a5ce0830 100644 --- a/README.md +++ b/README.md @@ -18,22 +18,27 @@ HTML template for the [AsyncAPI Generator](https://github.com/asyncapi/generator - [Usage](#usage) - [Supported parameters](#supported-parameters) - [Development](#development) -- [Contributors ✨](#contributors-%E2%9C%A8) +- [Contributors ✨](#contributors-) ## Usage +Install AsyncAPI CLI + ```bash -ag asyncapi.yaml @asyncapi/html-template -o output +npm install -g @asyncapi/cli ``` -If you don't have the AsyncAPI Generator installed, you can install it like this: +Generate using CLI ```bash -npm install -g @asyncapi/generator +asyncapi generate fromTemplate @asyncapi/html-template@0.28.0 ``` +You can replace `` with local path or URL pointing to [any AsyncAPI document](https://raw.githubusercontent.com/asyncapi/spec/master/examples/streetlights-kafka.yml). +Look into [Releases](/asyncapi/html-template/releases) of this template to pick up the version you need. It is not recommended to always use the latest in production. Always use a specific version. + ## Supported parameters | Name | Description | Required | Default | Allowed values | Example |