Skip to content

CLI to work with your AsyncAPI files. You can validate them and in the future use a generator and even bootstrap a new file. Contributions are welcomed!

License

Notifications You must be signed in to change notification settings

asyncapi/cli

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

72e46c3 · Dec 21, 2021
Dec 16, 2021
Nov 18, 2021
Oct 27, 2021
Nov 18, 2021
Dec 7, 2021
Oct 27, 2021
Oct 27, 2021
Oct 27, 2021
Dec 7, 2021
Jun 18, 2021
Nov 18, 2021
Nov 23, 2021
Sep 16, 2021
Sep 16, 2021
Feb 16, 2021
Nov 3, 2021
Dec 21, 2021
Dec 21, 2021
Nov 3, 2021

Repository files navigation


AsyncAPI logo
AsyncAPI CLI

CLI to work with your AsyncAPI files. Currently supports validation, but it is under development for more features.

GitHub license PR testing - if Node project npm

Table of contents

Requirements

To run @asyncapi/cli, you'll need Node.js >=v10

Run this terminal command to check your Node.js version:

node -v

If you don't have Node.js installed or NPM, simply install both via package manager

Installation

Run this command to install the CLI globally on your system:

npm install -g @asyncapi/cli

This installs the cli globaly on your system allowing you to run it from anywhere. If you want to install it locally, just remove the -g flag.

Cli will be available for installation brew and other app managers for other systems.

Usage

As of now, the @asyncapi/cli only supports validation of the specification file. (This is still under development for more features.)

We have well-documented help commands so just run:

asyncapi --help 

It should print something like:

All in one CLI for all AsyncAPI tools

USAGE
  $ asyncapi [COMMAND]

COMMANDS
  config    access configs
  help      display help for asyncapi
  new       creates a new asyncapi file
  validate  validate asyncapi file

Contributing

Read CONTRIBUTING guide.

Set up development environment

Follow these steps:

  • Clone the repo.
  • Run npm install to install all the required dependencies
  • Run npm run test to make sure everything is properly set up.

UX developed for the CLI should be compliant with Command Line Interface Guideline

Command Structure and Patterns

We are following verb + noun and namespace + noun + [verb] pattern for making our commands and arguments. For example asyncapi validate <spec-file-path> and asyncapi config context add <context-name> <spec-file-path>.