{"id":25314590,"url":"https://github.com/anasnew99/mqtt-cli","last_synced_at":"2026-04-18T12:03:31.344Z","repository":{"id":57147906,"uuid":"434975701","full_name":"Anasnew99/mqtt-cli","owner":"Anasnew99","description":"Simple MQTT CLI Created in NodeJS","archived":false,"fork":false,"pushed_at":"2021-12-05T08:47:45.000Z","size":199,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-06T06:18:42.786Z","etag":null,"topics":["cli","mqtt","mqtt-cli","mqtt-client","pubsub"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/mqtt-client-cli","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Anasnew99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-04T18:14:23.000Z","updated_at":"2023-05-16T17:21:27.000Z","dependencies_parsed_at":"2022-09-06T16:51:30.210Z","dependency_job_id":null,"html_url":"https://github.com/Anasnew99/mqtt-cli","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Anasnew99/mqtt-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anasnew99%2Fmqtt-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anasnew99%2Fmqtt-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anasnew99%2Fmqtt-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anasnew99%2Fmqtt-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anasnew99","download_url":"https://codeload.github.com/Anasnew99/mqtt-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anasnew99%2Fmqtt-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271745491,"owners_count":24813503,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","mqtt","mqtt-cli","mqtt-client","pubsub"],"created_at":"2025-02-13T17:21:58.866Z","updated_at":"2026-04-18T12:03:31.299Z","avatar_url":"https://github.com/Anasnew99.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/anasnew99"],"categories":[],"sub_categories":[],"readme":"# [mqtt-client-cli](https://github.com/Anasnew99/mqtt-cli)\n\n\u003e A simple MQTT Client CLI.\n\n\u003e This library is created and maintained by [Anas Aneeque](https://www.linkedin.com/in/anasnew99/)\n\n\u003e This library is written for Node.js\n\n\u003e Written in typescript.\n\n# Features\n\n- Connect to MQTT Server using broker url.\n- Test MQTT Connections.\n- Subscribe topic and receive messages.\n- Publish message to topic.\n\n# Usage\n\n## Use it with CLI.\n\n```\nnpm i -g mqtt-client-cli\nmqtt-client-cli \u003cBROKER URL\u003e\n```\n\nor also you can use shorthand\n\n```\nmcc \u003cBROKER URL\u003e\n```\n\nBroker URL Example\n\n```\nprotocol://user:password@host:8883/path\n```\n\n![Usage Example](https://raw.githubusercontent.com/Anasnew99/mqtt-cli/main/example/connect.jpg)\n\nSubscribe to a topic\n\n```\nsub Hello\n```\n\n![Subscribe Example](https://raw.githubusercontent.com/Anasnew99/mqtt-cli/main/example/sub.jpg)\n\nNow to check whether we are really subscribed, we will publish a message to Hello\n\n```\npub Hello \"Hello World\"\n```\n\n![Publish Example](https://raw.githubusercontent.com/Anasnew99/mqtt-cli/main/example/pub.jpg)\n\nVoila we received a message, output format of the recieved message is '\u003cmessage\u003e@\u003ctopic\u003e'\n\nAny error occur in subscribing or publishing, a log will be received\n\n![Error Example](https://raw.githubusercontent.com/Anasnew99/mqtt-cli/main/example/error.jpg)\n\nAt last, exit anytime by pressing e.\n\n## Use as a package in other nodejs app.\n\nInstall it in your project.\n\n```\nnpm install mqtt-client-cli\n```\n\nUse in your project with same interface as of cli.\n\n```js\nconst { connectMQTT } = require(\"mqtt-client-cli\");\nconnectMQTT(\"ws://localhost:1883\");\n```\n\n# Support\n\n\u003ca href=\"https://www.buymeacoffee.com/anasnew99\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanasnew99%2Fmqtt-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanasnew99%2Fmqtt-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanasnew99%2Fmqtt-cli/lists"}