Categorygithub.com/shuza/mqtt-cli
modulepackage
1.0.0
Repository: https://github.com/shuza/mqtt-cli.git
Documentation: pkg.go.dev

# README

Mqtt-cli

This a simple mqtt-cli application written in Go. It has pub sub command which is suite for the shell script pipelining.

Install

If you have golang ready environment, you can easily install it

go get github.com/shuza/mqtt-cli

Usage

You can set host, port, clientId, topic and qos on the Environment variables.

export MQTT_HOST="localhost"
export MQTT_PORT="1883"
export MQTT_CLIENT_ID="mqtt-cli"
export MQTT_TOPIC="/test/mqtt/cli"
export MQTT_QOS="1"

Or you can use flags to do it.

NameShort HandDescription
addressaSet MQTT host address
portpSet MQTT host port
clientIdiSet MQTT client ID
topictSet MQTT topic
qosqSet MQTT service quality
messagemSet MQTT message palyload

Sub

mqtt-cli sub -a "localhost" -p 1883 -t "/tmp/a"

Pub

mqtt-cli pub -a "localhost" -p 1883 -t "/tmp/a" -m "thsi is to test"

Solid

# Packages

No description provided by the author
No description provided by the author
No description provided by the author