hivemq/mqtt-cli

MQTT CLI is a useful command line interface for connecting various MQTT clients supporting MQTT 5.0 and 3.1.1

Java

363

1,594 commits

updated Sep 28, 2026

See the code

README

GitHub Release GitHub Workflow Status (branch) CLI Downloads CLI License

mqtt-cli is a feature-rich MQTT Command Line Interface.



Getting Started • Publish • Subscribe • Shell • Test • How to Contribute

Getting Started

Publish

  • Publish a message
  • Quick start: mqtt pub -t your-topic -m "your message" -h your-mqtt-broker.com
  • Further documentation

Subscribe

  • Subscribe to topics and receive output directly on the console
  • Quick start: mqtt sub -t your-topic -h your-mqtt-broker.com
  • Further documentation

Shell

  • Enter the mqtt-cli shell mode to access more MQTT functionality
  • Quick start: mqtt sh
  • Further documentation

Test

  • Run tests against a broker to find out its features and limitations
  • Quick start: mqtt test -h your-mqtt-broker.com
  • Further documentation

How to Contribute

cli
iot
java
mqtt
mqtt-client

Significant stargazers

Alexandr Evstigneev

73 followers · starred Nov 2021

Oisin Grehan

117 followers · starred Apr 2025

Andrea Selva

124 followers · starred May 2021

Spencer Herzberg

57 followers · starred Dec 2019

hivemq/mqtt-cli

MQTT CLI is a useful command line interface for connecting various MQTT clients supporting MQTT 5.0 and 3.1.1

Java

363

1,594 commits

updated Sep 28, 2026

See the code

README

GitHub Release GitHub Workflow Status (branch) CLI Downloads CLI License

mqtt-cli is a feature-rich MQTT Command Line Interface.



Getting Started • Publish • Subscribe • Shell • Test • How to Contribute

Getting Started

Publish

  • Publish a message
  • Quick start: mqtt pub -t your-topic -m "your message" -h your-mqtt-broker.com
  • Further documentation

Subscribe

  • Subscribe to topics and receive output directly on the console
  • Quick start: mqtt sub -t your-topic -h your-mqtt-broker.com
  • Further documentation

Shell

  • Enter the mqtt-cli shell mode to access more MQTT functionality
  • Quick start: mqtt sh
  • Further documentation

Test

  • Run tests against a broker to find out its features and limitations
  • Quick start: mqtt test -h your-mqtt-broker.com
  • Further documentation

How to Contribute

cli
iot
java
mqtt
mqtt-client

Significant stargazers

Alexandr Evstigneev

73 followers · starred Nov 2021

Oisin Grehan

117 followers · starred Apr 2025

Andrea Selva

124 followers · starred May 2021

Spencer Herzberg

57 followers · starred Dec 2019

Languages

Java

97.7%