# MQTTX CLI

> MQTTX CLI is an open-source (Apache-2.0) MQTT 5.0 command-line client by EMQ for terminal pub/sub, benchmarking, and data simulation, with an Agent Skill for AI coding agents.

Latest version: v1.13.3

## Install

- macOS/Linux: `curl -fsSL https://emqx.sh/mqttx | sh`. Installs to `~/.local/bin`; set `MQTTX_VERSION` to pin a release.
- Windows PowerShell: `irm https://emqx.sh/mqttx.ps1 | iex`. Adds `mqttx` to your user PATH.
- Homebrew: `brew install emqx/mqttx/mqttx-cli`
- npm: `npm install mqttx-cli -g`
- Docker: `docker pull emqx/mqttx-cli`, then `docker run -it --rm emqx/mqttx-cli`

## Binaries

- macOS ARM64: https://www.emqx.com/en/downloads/MQTTX/v1.13.3/mqttx-cli-macos-arm64
- macOS x64: https://www.emqx.com/en/downloads/MQTTX/v1.13.3/mqttx-cli-macos-x64
- Windows x64: https://www.emqx.com/en/downloads/MQTTX/v1.13.3/mqttx-cli-win-x64.exe
- Windows ARM64: https://www.emqx.com/en/downloads/MQTTX/v1.13.3/mqttx-cli-win-arm64.exe
- Linux x64: https://www.emqx.com/en/downloads/MQTTX/v1.13.3/mqttx-cli-linux-x64
- Linux ARM64: https://www.emqx.com/en/downloads/MQTTX/v1.13.3/mqttx-cli-linux-arm64

## Quick start

```bash
mqttx conn -h 'broker.emqx.io' -p 1883 -u 'admin' -P 'public'
mqttx sub -t 'hello' -h 'broker.emqx.io' -p 1883
mqttx pub -t 'hello' -h 'broker.emqx.io' -p 1883 -m 'Hello from MQTTX CLI'
```

## Docs

- [Introduction](https://mqttx.app/docs/cli.md)
- [Installation](https://mqttx.app/docs/cli/downloading-and-installation.md)
- [Get Started](https://mqttx.app/docs/cli/get-started.md)
- [AI Agent Skill](https://mqttx.app/docs/cli/agent-skill.md)
- [FAQ](https://mqttx.app/docs/cli/faq.md)
- Product page: https://mqttx.app/cli
