mqttv5-cli-0.4.0 is not a library.
mqttv5 - Superior MQTT v5.0 Command Line Interface
A unified MQTT v5.0 CLI tool that replaces mosquitto_pub, mosquitto_sub, and mosquitto with superior ergonomics and user experience.
Features
- Unified Interface: Single binary with pub, sub, and broker subcommands
- Smart Prompting: Interactive prompts for missing arguments
- Superior Error Messages: Helpful validation with correction suggestions
- Full MQTT v5.0: Complete protocol support including all v5.0 features
- Cross-Platform: Works on Linux, macOS, and Windows
Installation
Usage
Publishing Messages
# Basic publish
# With QoS and retain
# Interactive mode (prompts for missing args)
Subscribing to Topics
# Basic subscribe
# Verbose mode shows topic names
# Subscribe for specific message count
Running a Broker
# Start broker on default port
# Custom port and bind address
# Interactive configuration
Key Advantages over mosquitto
- Better Error Messages: Clear, actionable error messages with suggestions
- Smart Defaults: Intelligent prompting for missing required arguments
- Unified Tool: One binary replaces mosquitto_pub, mosquitto_sub, and mosquitto
- Modern CLI Design: Consistent flags and intuitive interface
- Full v5.0 Support: All MQTT v5.0 features including properties and reason codes
Examples
Publishing sensor data
Monitoring all home sensors
Testing with retained messages
Environment Variables
MQTT_HOST: Default broker host (default: localhost)MQTT_PORT: Default broker port (default: 1883)
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.