| title | weight |
|---|---|
Installation guide |
30 |
To use the AsyncAPI CLI tool, you must install NPM and Node.js version 10 or higher. To check if you already have both installed, run the following commands in your terminal:
# check if node is installed
node -v
# or
node --version
# check if NPM is installed
npm -v
# or
npm --versionIf you don’t have Node.js or NPM installed, you can install both with this Node.js package manager.
After installing Node.js and NPM, run the following command to install the AsyncAPI CLI globally:
npm install -g @asyncapi/cliThere are two ways to install the AsyncAPI CLI on your macOS: using the brew package manager or pkg files.
To install the AsyncAPI CLI using the brew package manager, run the following commands in your terminal:
# Install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install AsyncAPI CLI
brew install asyncapiEvery release of the AsyncAPI CLI has two macOS dedicated pkg file that enables you to install the CLI tool as a macOS application for x64 as well as arm64 architecture.
To download the latest CLI release, run this command in your terminal:
# For x64
curl -OL https://github.com/asyncapi/cli/releases/latest/download/asyncapi.x64.pkg
# For arm64
curl -OL https://github.com/asyncapi/cli/releases/latest/download/asyncapi.arm64.pkgTo download a specific CLI release, run this command in your terminal:
curl -OL https://github.com/asyncapi/cli/releases/download/<replace this with the specific CLI version e.g v0.13.0>/asyncapi.pkgAfter downloading the AsyncAPI CLI, install it via the following command:
sudo installer -pkg asyncapi.pkg -target /For Windows just install the appropriate installer and simply follow the default installation steps to complete the installation process.
Download asyncapi.x64.exe for 64-bit Windows and download asyncapi.x86.exe for 32-bit Windows.
Selecting the appropriate AsyncAPI CLI installation method on a Linux operating system depends on your Linux distro.
For Debian based distros, you can install the AsycAPI CLI using the dpkg package manager for Debian.
curl -OL https://github.com/asyncapi/cli/releases/latest/download/asyncapi.debTo download a specific release of the CLI, run this command in your terminal:
curl -OL https://github.com/asyncapi/cli/releases/download/<replace this with the specific CLI version e.g v0.13.0>/asyncapi.debYou can install the AsyncAPI CLI for other Linux distros using the archive tar.gz file. To download the latest release of the CLI, run this command in your terminal:
curl -OL https://github.com/asyncapi/cli/releases/latest/download/asyncapi.tar.gzTo download a specific release of the CLI, run this command in your terminal:
curl -OL https://github.com/asyncapi/cli/releases/download/<replace this with the specific CLI version e.g v0.13.0>/asyncapi.tar.gzOnce you have downloaded the archived file, untar it by running this command in your terminal:
tar -xzf asyncapi.tar.gzThe step above will create an AsyncAPI directory in the current path. To run the CLI from anywhere, you must create a symlink. If the current path you are on is /user/local/bin, for example, you must create the symlink in the /user/local/bin directory by following these steps:
# cd into the unarchived directory
cd asyncapi
# get the absolute path
pwd
# Create a symlink
ln -s <absolute-path>/bin/asyncapi /user/local/bin/asyncapi
# The "asyncapi" command should be available to be used
asyncapi