Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jcosentino11 committed Jun 7, 2024
1 parent bd9f4e9 commit e02e8d5
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Bare-bones MQTT CLI for Mac and Linux.

This project is a personal learning exercise, for diving into MQTT internals and network programming. On the small chance that you're considering actually using this client....just use one of the real ones listed below.

## Publish to a topic
```
mqtt pub -t hello/topic -a localhost:1883 -c clientId '{"hello": "world"}'
```

```
Usage: mqtt pub [-v] -t <topic> -a <address> -c <clientId> <message>
Options:
Expand All @@ -14,13 +19,23 @@ Options:
-h, --help Show this help message
```

## Publish to a topic
## Subscribe to a topic

> :alert: Work in progress. Subscribe request is sent, but still need to actually listen for payloads.
```
mqtt pub -t hello/topic -a localhost:1883 -c clientId '{"hello": "world"}'
mqtt sub -t hello/topic -a localhost:1883 -c clientId
```

## Subscribe to a topic
WIP
```
Usage: mqtt sub [-v] -t <topic> -a <address> -c <clientId>
Options:
-t, --topic <topic> Specify the topic to publish to (required)
-a, --address <address> <host>[:<port>] address to connect to (required)
-c, --client-id <client id> Client identifier
-v, --verbose Enable verbose output
-h, --help Show this help message
```

## Features

Expand Down

0 comments on commit e02e8d5

Please sign in to comment.