Subscribe to a MQTT Topic or publish something quickly from the terminal
Subscribe to a MQTT Topic or publish something quickly from the terminal
Subscribe to a MQTT Topic or publish something quickly from the terminal
# Subscribe to everything (#)
mqttui
# Subscribe to topic
mqttui "topic"
# Subscribe to topic with a specific host (default is mqtt://localhost)
mqttui --broker "mqtt://test.mosquitto.org" "hello/world"
# More arguments and details
mqttui --help
mqttui publish "hello" "world"
mqttui publish --retain "foo/bar" "Banana?"
# Use stdin to publish file contents
mqttui publish "foo/bar" --.zip`
Choose the correct file for your given CPU architecture and platform.
The prebuilt CPU architectures include:
- AMD/Intel: x86_64
- 64 bit ARMv8: aarch64
- 64 bit RISC-V: riscv64gc
- 32 bit ARMv7: armv7
- 32 bit ARMv6: arm
#### Debian, Ubuntu, and Deb based Linux
Download the appropriate `.deb` for your architecture and run:
```bash
sudo dpkg -i
Download the appropriate .rpm for your architecture and run:
sudo rpm -i
The binaries are also shipped as plain tarballs, targeting each architecture for any generic Linux or macOS.
Note that the Linux binaries are built for glibc based systems. You will need to compile from source for other libc/musl systems like Alpine Linux (or install via repos).
You need to extract the tarball and put the binary somewhere on your path (common locations are ~/bin, ~/.local/bin or /usr/local/bin).
Download the appropriate mqttui---pc-windows-msvc.zip for your architecture and extract the content somewhere useful.
cargo install --path .Taking a look into existing "lets just view MQTT right now" or "quickly publish something" projects they are always quite bulky and not that fast.
Before having mqttui I used thomasnordquist/MQTT-Explorer as it has a great overview of what's going on, a small topic based history and a sorted main view.
But while it's running its eating up a lot of resources.
Publishing something quickly from command line is also not that fun. The feature rich CLI alternative hivemq/mqtt-cli takes some time to do its job and is not as easy to use as it has a lot of flags to specify. Subscribing to many topics also isn't as useful to watch at as I hoped for.
While mosquitto_sub and mosquitto_pub are bundled when installing Mosquitto they are also a bit bulky to use.
That's why I started building my own terminal based version to quickly watch or publish MQTT stuff. It won't be as feature rich as something like the HiveMQ CLI approach, but it aims at being easy to use and fast.
No open issues yet, or sync has not completed.