Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@asyncapi/cli

Package Overview
Dependencies
Maintainers
3
Versions
400
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asyncapi/cli

AsyncAPI CLI CLI to work with your

  • 0.6.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22K
increased by11.71%
Maintainers
3
Weekly downloads
 
Created
Source

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 

API Reference

validate

USAGE

asyncapi validate <spcPath | context-name> [options]

If you already have your current context set, run the following command:

asyncapi validate

OPTIONS

-h, --help Display help for command
-w, --watch Enable watch mode (not implemented yet)

context

Context makes it easier for you to work with multiple AsyncAPI Files. You can add multiple different files to a context so that you don't have to pass the file as an input every time you use any command. You can also set a default context so that you don't have to pass in either file paths or context names as an input.

USAGE

asyncapi context [options] [command]

COMMANDS

commandargumentsdescriptionexample
listnonelists all saved contextasyncapi context list
currentnoneset current contextasyncapi context current
use<context-name>set any context from the list as currentasyncapi context use test
add<context-name> <spec-file-path>add/update a contextasyncapi context add root ./asyncapi.yml
remove<context-name>remove a context from the listasyncapi context remove root

OPTIONS

-h, --help display help for command

Contributing

Read CONTRIBUTING guide.

Set up development enviornment

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>.

FAQs

Package last updated on 05 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc