Installation

MQTTX CLI supports Windows, macOS, and Linux. You can install MQTTX CLI in the following ways:

  1. Command Line: Quick installation with binaries.
  2. Desktop Client: Install directly via desktop app.
  3. Docker: Use Docker for installation.
  4. NPM: Install using NPM.
  5. Manual or GitHub: Download and install manually.

If you encounter network issues that cause slow or stuck downloads from GitHub, we recommend that you download and install from MQTTX CLI homepage.

If you need to download and use more released versions, you can also check out More Downloads, choose the version that meets your needs, and install it.

Note: When downloading, pay attention to distinguish the CPU architecture of the current system environment, and try to choose the latest version to download.

macOS

Homebrew

brew install emqx/mqttx/mqttx-cli

Intel Chip

curl -LO https://www.emqx.com/zh/downloads/MQTTX/${version}/mqttx-cli-macos-x64
sudo install ./mqttx-cli-macos-x64 /usr/local/bin/mqttx

Apple Silicon

curl -LO https://www.emqx.com/zh/downloads/MQTTX/${version}/mqttx-cli-macos-arm64
sudo install ./mqttx-cli-macos-arm64 /usr/local/bin/mqttx

Linux

x86-64

curl -LO https://www.emqx.com/zh/downloads/MQTTX/${version}/mqttx-cli-linux-x64
sudo install ./mqttx-cli-linux-x64 /usr/local/bin/mqttx

ARM64

curl -LO https://www.emqx.com/zh/downloads/MQTTX/${version}/mqttx-cli-linux-arm64
sudo install ./mqttx-cli-linux-arm64 /usr/local/bin/mqttx

Windows

For Windows users, please go to the MQTTX CLI home page or GitHub and find the exe package for the corresponding system architecture, download it manually and use it.

Note: When using commands that require input string data, please be aware to use double quotes in Windows cmd, while single quotes can be used in PowerShell. Additionally, the paths use \ while in other operating systems they use /.

Docker

docker pull emqx/mqttx-cli

docker run -it --rm emqx/mqttx-cli

NPM

npm install mqttx-cli -g

Other platforms

Download packaged binaries from the MQTTX releases page.

Verify installation

After installation, you can verify that the installation is successful by running the following command:

mqttx -v