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
402
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asyncapi/cli

All in one CLI for all AsyncAPI tools

  • 0.30.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17K
decreased by-18.58%
Maintainers
3
Weekly downloads
 
Created
Source

AsyncAPI CLI

CLI to work with your AsyncAPI files. Currently under development, we are working to bring more features.

GitHub license PR testing - if Node project npm

Table of contents

Installation

Using NPM and Node

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

Install the CLI globaly on your system run CLI it from anywhere:

npm install -g @asyncapi/cli

MacOS

Using brew

You can install this CLI using brew package manager.

# Install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install AsyncAPI CLI
brew install asyncapi
Using pkg

Each release of CLI produces a MacOS dedicated pkg file that enables you to install this CLI as MacOS application.

# Download latest release. To download specific release, your link should look similar to https://github.com/asyncapi/cli/releases/download/v0.13.0/asyncapi.pkg. All releases are listed in https://github.com/asyncapi/cli/releases
curl -OL https://github.com/asyncapi/cli/releases/latest/download/asyncapi.pkg
# Install AsyncAPI CLI
sudo installer -pkg asyncapi.pkg -target /

Linux

For debian based distros

You can install this CLI using dpkg, a package manager for debian.

# Download latest release. To download specific release, your link should look similar to https://github.com/asyncapi/cli/releases/download/v0.13.0/asyncapi.deb. All releases are listed in https://github.com/asyncapi/cli/releases
curl -OL https://github.com/asyncapi/cli/releases/latest/download/asyncapi.deb
# Install AsyncAPI CLI
sudo dpkg -i asyncapi.deb
For other distros

You can install this CLI using the archive(tar.gz) file.

# Download latest release. To download specific release, your link should look similar to https://github.com/asyncapi/cli/releases/download/v0.13.0/asyncapi.tar.gz. All releases are listed in https://github.com/asyncapi/cli/releases
curl -OL https://github.com/asyncapi/cli/releases/latest/download/asyncapi.tar.gz
# Untar the archive file
tar -xzf asyncapi.tar.gz

The above step will create an asyncapi directory in the current path.

Create a symlink to run the CLI from anywhere. We will create the symlink in /usr/local/bin directory since this directory is already in the PATH.

# cd into the unarchived directory
cd asyncapi

# get the absolute path
pwd

# Create a symlink
ln -s <absolute-path>/bin/asyncapi /usr/local/bin/asyncapi

# The `asyncapi` command should be available to be used
asyncapi

Usage

@asyncapi/cli makes it easier to work with asyncpi files.

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
  diff      	find diff between two AsyncAPI files
  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
      python        	generate the models for Python
      rust              generate the models for Rust
    fromTemplate 	generate whatever you want using templates compatible with AsyncAPI Generator 

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
  • Run npm run build and then bin/run to try new CLI locally

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

Contributors

Thanks goes to these wonderful people (emoji key):


Jorge Aguiar Martín

💻 🤔 ⚠️ 📖

Lukasz Gornicki

🤔 💻 👀 🚧

souvik

💻 🤔 ⚠️ 👀 🚧 📖

David Boyne

💻 🤔 🚧

Fran Méndez

💻 🤔 👀

Maciej Urbańczyk

👀 🚧 🤔

Aayush Kumar Sahu

💻 ⚠️

Mihir Kulkarni

💻

Abir

⚠️ 💻

Peter Ramos

💻

Samriddhi

⚠️

Pranay Kharabe

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Keywords

FAQs

Package last updated on 31 Jan 2023

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