-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(cli): update ls command #1294
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,6 +140,9 @@ mqttx simulate -sc tesla -c 10 | |
|
||
# Specify a scenario file and start the simulation | ||
mqttx simulate -f <scenario file path> -c 10 | ||
|
||
# List the built-in scenarios | ||
mqttx ls -sc | ||
``` | ||
|
||
### Help | ||
|
@@ -162,7 +165,7 @@ mqttx --help | |
| bench | MQTT Benchmark in performance testing | | ||
| simulate | Simulate publishing scenario-specific MQTT messages | | ||
|
||
#### Connect | ||
### Connect | ||
|
||
```shell | ||
mqttx conn --help | ||
|
@@ -207,7 +210,7 @@ mqttx conn --help | |
| --config \[PATH\] | load the parameters from the local configuration file, which supports json and yaml format, default path is `./mqttx-cli-config.json` | | ||
| --help | display help for conn command | | ||
|
||
#### Subscribe | ||
### Subscribe | ||
|
||
```shell | ||
mqttx sub --help | ||
|
@@ -262,7 +265,7 @@ mqttx sub --help | |
| --config \[PATH\] | load the parameters from the local configuration file, which supports json and yaml format, default path is `./mqttx-cli-config.json` | | ||
| --help | display help for sub command | | ||
|
||
#### Publish | ||
### Publish | ||
|
||
```shell | ||
mqttx pub --help | ||
|
@@ -412,6 +415,36 @@ module.exports = { | |
|
||
For more examples and detailed editing guides, please refer to the [scripts-example](https://github.com/emqx/MQTTX/tree/main/scripts-example/IoT-data-scenarios) in the MQTTX GitHub repository, or see how to use [faker.js](https://fakerjs.dev/) to generate various types of random data. | ||
|
||
### List | ||
|
||
The `list` command provides an overview of available resources. | ||
|
||
> Currently, it supports listing built-in scenarios. | ||
|
||
```shell | ||
mqttx list --help | ||
``` | ||
|
||
| Options | Description | | ||
| ----------------------------- | -------------------------------- | | ||
| -sc, --scenarios | list the built-in scenarios | | ||
|
||
#### Built-in Scenarios | ||
|
||
You can use the `--scenarios` option to display a list of built-in scenarios. | ||
|
||
```shell | ||
mqttx list --scenarios | ||
``` | ||
|
||
This command will output a table that shows the name and description of each built-in scenario. If you want to use one of them in the simulate command, simply specify the scenario name in the `--scenario` option: | ||
|
||
```shell | ||
mqttx simulate --scenario <SCENARIO> | ||
``` | ||
|
||
More options and features will be added to the `list` command in the future. Stay tuned! | ||
|
||
## Better Together with EMQX | ||
|
||
MQTTX is designed to connect to test MQTT Brokers such as EMQX, The one-click connection and simple graphical interface make it easy to connect to EMQX or EMQX Cloud to debug and explore functional features. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the Code review and look for potential issues with the patch.
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the code review!
The code looks good and well written. I suggest to make some adjustments to your comments such as:
list
commandApart from these changes, the code patch looks good and is ready to be deployed!