{"id":18053332,"url":"https://github.com/luzifer/mqttcli","last_synced_at":"2026-04-18T11:32:19.247Z","repository":{"id":64307827,"uuid":"199522292","full_name":"Luzifer/mqttcli","owner":"Luzifer","description":"Small CLI util to interface with a MQTT server","archived":false,"fork":false,"pushed_at":"2023-10-14T21:54:40.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T15:41:07.948Z","etag":null,"topics":["cli","client","mqtt"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Luzifer.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://www.paypal.me/luzifer"],"github":["Luzifer"],"ko_fi":"luziferus"}},"created_at":"2019-07-29T20:26:54.000Z","updated_at":"2022-02-07T12:35:15.000Z","dependencies_parsed_at":"2023-01-15T11:00:46.696Z","dependency_job_id":"9afe562c-e2e3-486f-b530-320f702fa872","html_url":"https://github.com/Luzifer/mqttcli","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzifer%2Fmqttcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzifer%2Fmqttcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzifer%2Fmqttcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzifer%2Fmqttcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Luzifer","download_url":"https://codeload.github.com/Luzifer/mqttcli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305942,"owners_count":20917208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","client","mqtt"],"created_at":"2024-10-30T23:16:50.717Z","updated_at":"2025-10-10T19:38:03.068Z","avatar_url":"https://github.com/Luzifer.png","language":"Go","funding_links":["https://www.paypal.me/luzifer","https://github.com/sponsors/Luzifer","https://ko-fi.com/luziferus"],"categories":[],"sub_categories":[],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/Luzifer/mqttcli)](https://goreportcard.com/report/github.com/Luzifer/mqttcli)\n![](https://badges.fyi/github/license/Luzifer/mqttcli)\n![](https://badges.fyi/github/downloads/Luzifer/mqttcli)\n![](https://badges.fyi/github/latest-release/Luzifer/mqttcli)\n\n# Luzifer / mqttcli\n\n`mqttcli` is a small CLI util to interface with a MQTT server. It can be used to publish messages to oder subscribe messages from a MQTT server.\n\nAt the moment it is intended to connect to simple setups using plain `tcp`, `ssl` with trusted certificates or websockets (`ws`). More options to come later.\n\n## Usage\n\n```console\n# mqttcli --help\nUsage of mqttcli:\n      --log-level string        Log level (debug, info, warn, error, fatal) (default \"info\")\n  -m, --message string          \n  -b, --mqtt-broker string      Broker URI to connect to scheme://host:port (scheme is one of 'tcp', 'ssl', or 'ws') (default \"tcp://localhost:1883\")\n      --mqtt-client-id string   Client ID to use when connecting, must be unique (default \"21064ab7-c296-445e-b8b6-d1bced77853c\")\n  -p, --mqtt-pass string        Password to identify against the broker\n      --mqtt-timeout duration   How long to wait for the client to complete operations (default 10s)\n  -u, --mqtt-user string        Username to identify against the broker\n  -o, --output-format string    How to ouptut received messages (One of 'log', 'csv', 'jsonl') (default \"log\")\n      --qos int                 QOS to use (0 - Only Once, 1 - At Least Once, 2 - Only Once) (default 1)\n      --retain                  Retain message on topic\n  -t, --topic strings           Topic to subscribe / publish to\n      --version                 Prints current version and exits\n```\n\n## Examples\n\n```console\n# envrun -- mqttcli sub -t 'mysensor/+'\nINFO[0001] Message received                              message=4058 qos=1 retained=false topic=mysensor/co2\n\n# envrun -- mqttcli sub -t 'mysensor/+' -o csv\nTopic,QOS,Retained,Message\nmysensor/co2,1,false,\"3978\"\n\n# envrun -- mqttcli sub -t 'mysensor/+' -o jsonl\n{\"topic\":\"mysensor/co2\",\"qos\":1,\"retained\":false,\"message\":\"3972\"}\n```\n\n```console\n# envrun -- mqttcli pub -t mysensor/test -m 'ohai?'\n\n# envrun -- mqttcli sub -t 'mysensor/+'\nINFO[0001] Message received                              message=\"ohai?\" qos=1 retained=false topic=mysensor/test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluzifer%2Fmqttcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluzifer%2Fmqttcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluzifer%2Fmqttcli/lists"}