npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

asuka-cli

v1.8.3

Published

MQTT X Command Line Tools

Readme

MQTT X CLI

GitHub Release build packages Total Downloads Docker Slack Discord Community YouTube Twitter

English | 简体中文


MQTT X CLI is an open source MQTT 5.0 CLI Client and MQTT X on the command line. Designed to help develop and debug MQTT services and applications faster without the need to use a graphical interface.

MQTT stands for MQ Telemetry Transport. It is a publish/subscribe, extremely simple and lightweight messaging protocol, designed for constrained devices and low-bandwidth, high-latency or unreliable networks.

Preview

mqttx-preview

Installation

macOS

To install the latest MQTTX CLI stable release on macOS using binary download.

Note: Please note CPU architecture of the current system environment

Intel Chip

curl -LO https://www.emqx.com/en/downloads/MQTTX/v1.8.2/mqttx-cli-macos-x64
sudo install ./mqttx-cli-macos-x64 /usr/local/bin/mqttx

Apple Silicon

curl -LO https://www.emqx.com/en/downloads/MQTTX/v1.8.2/mqttx-cli-macos-arm64
sudo install ./mqttx-cli-macos-arm64 /usr/local/bin/mqttx

Homebrew

brew install emqx/mqttx/mqttx-cli

Linux

To install the latest MQTTX CLI stable release on Linux using binary download.

Note: Please note CPU architecture of the current system environment

x86-64

curl -LO https://www.emqx.com/en/downloads/MQTTX/v1.8.2/mqttx-cli-linux-x64
sudo install ./mqttx-cli-linux-x64 /usr/local/bin/mqttx

ARM64

curl -LO https://www.emqx.com/en/downloads/MQTTX/v1.8.2/mqttx-cli-linux-arm64
sudo install ./mqttx-cli-linux-arm64 /usr/local/bin/mqttx

Windows

Windows users should go to the MQTT X release page and find the exe package for the corresponding system architecture, download it manually and execute.

NPM

npm install mqttx-cli -g

Docker

docker pull emqx/mqttx-cli

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

Other platforms

Download packaged binaries from the MQTT X releases page.

Usage

After installing it, run mqttx on the terminal

Quickstart

Connect

mqttx conn -h 'broker.emqx.io' -p 1883 -u 'admin' -P 'public'

Subscribe

mqttx sub -t 'hello' -h 'broker.emqx.io' -p 1883

Publish

mqttx pub -t 'hello' -h 'broker.emqx.io' -p 1883 -m 'from MQTTX CLI'

Help

mqttx --help

| Options | Description | | ------------- | ------------------------- | | -v, --version | output the version number | | -h, --help | display help for command |

| Command | Description | | ------- | ---------------------------------------------- | | check | Check for updates | | conn | Create a connection and connect to MQTT Broker | | pub | Publish a message to a topic | | sub | Subscribes to a topic |

Connect

mqttx conn --help

| Options | Description | | ------------------------------------------ | ------------------------------------------------------------ | | -V, --mqtt-version <5/3.1.1/3.1> | the MQTT version (default: 5) | | -h, --hostname | the broker host (default: "localhost") | | -p, --port | the broker port | | -i, --client-id | the client id | | --no-clean | set the clean session flag to false (default: true) | | -k, --keepalive | send a ping every SEC seconds (default: 30) | | -u, --username | the username | | -P, --password | the password | | -l, --protocol | the protocol to use, mqtt or mqtts (default: mqtt) | | --key | path to the key file | | --cert | path to the cert file | | --ca | path to the ca certificate | | --insecure | do not verify the server certificate | | -up, --user-properties <USERPROPERTIES...> | the user properties of MQTT 5.0 (e.g. -up "name: mqttx cli") | | --will-topic | the will topic | | --will-message | the will message | | --will-qos <0/1/2> | the will qos | | --will-retain | send a will retained message (default: false) | | --help | display help for conn command |

Subscribe

mqttx sub --help

| Options | Description | | ------------------------------------------ | ------------------------------------------------------------ | | -V, --mqtt-version <5/3.1.1/3.1> | the MQTT version (default: 5) | | -h, --hostname | the broker host (default: "localhost") | | -p, --port | the broker port | | -i, --client-id | the client id | | -q, --qos <0/1/2> | the QoS of the message (default: 0) | | --no-clean | set the clean session flag to false (default: true) | | -t, --topic | the message topic | | -k, --keepalive | send a ping every SEC seconds (default: 30) | | -u, --username | the username | | -P, --password | the password | | -l, --protocol | the protocol to use, mqtt or mqtts (default: mqtt) | | -nl, --no_local | the no local MQTT 5.0 flag | | -rap, --retain-as-published | the retain as published MQTT 5.0 flag | | -rh, --retain-handling <0/1/2> | the retain handling MQTT 5.0 | | --key | path to the key file | | --cert | path to the cert file | | --ca | path to the ca certificate | | --insecure | do not verify the server certificate | | -up, --user-properties <USERPROPERTIES...> | the user properties of MQTT 5.0 (e.g. -up "name: mqttx cli") | | --will-topic | the will topic | | --will-message | the will message | | --will-qos <0/1/2> | the will qos | | --will-retain | send a will retained message (default: false) | | -v, --verbose | print the topic before the message | | --help | display help for sub command |

Publish

mqttx pub --help

| Options | Description | | ------------------------------------------ | ------------------------------------------------------------ | | -V, --mqtt-version <5/3.1.1/3.1> | the MQTT version (default: 5) | | -h, --hostname | the broker host (default: "localhost") | | -p, --port | the broker port | | -i, --client-id | the client id | | -q, --qos <0/1/2> | the QoS of the message (default: 0) | | -t, --topic | the message topic | | -m, --message | the message body (default: "Hello From MQTT X CLI") | | -r, --retain | send a retained message (default: false) | | -s, --stdin | read the message body from stdin | | -M, --multiline | read lines from stdin as multiple messages | | -u, --username | the username | | -P, --password | the password | | -l, --protocol | the protocol to use, mqtt or mqtts (default: mqtt) | | --key | path to the key file | | --cert | path to the cert file | | --ca | path to the ca certificate | | --insecure | do not verify the server certificate | | -up, --user-properties <USERPROPERTIES...> | the user properties of MQTT 5.0 (e.g. -up "name: mqttx cli") | | --will-topic | the will topic | | --will-message | the will message | | --will-qos <0/1/2> | the will qos (default: 0) | | --will-retain | send a will retained message (default: false) | | --help | display help for pub command |

Better Together with EMQX

MQTT X is designed to connect to test MQTT Brokers such as EMQX, The one-click connection and simple graphical interface make it easy to connect to EMQX or EMQX Cloud to debug and explore functional features.

Sign up EMQX Cloud for 14 days free trial

Download EMQX locally right now

Get Involved

Develop

Recommended version for Node environment:

  • v14.*.*
# Clone
git clone [email protected]:emqx/MQTTX.git

# Install dependencies
cd MQTTX/cli
yarn install

# Compiles and hot-reloads for development
yarn run dev

# Compiles and minifies for production
yarn run build

After a successful build, the corresponding file for the successful build will appear in the dist directory and will need to be used in a Node.js environment.

If you need to package a binary executable, please refer to the following command.

# Install pkg lib
npm install pkg -g

# Build binary
pkg package.json

After a successful build, you will see the binary executable for each system in the release directory.

Contributing

Please make sure to read the Contributing Guide before making a pull request.

Technology Stack

License

Apache License 2.0, see LICENSE.