feat(iroh-cli): improve ergonomics of iroh gossip subscribe
CLI cmd
#2751
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.
Description
Previously the gossip command could be confusing:
Now, the output is more helpful:
And the help text also contains examples & explanation on how the command works.
Breaking Changes
None. The command still works the same way.
Notes & open questions
Closes #2698
Should we rename the command? When I read
gossip subscribe
initially, I thought agossip publish
command may be missing. But actuallygossip subscribe
does both.Perhaps
gossip join
may be better?But also: We want to keep the CLI names in sync with the names in the code API. Perhaps we should rename the API call to be
join
instead ofsubscribe
? Or perhaps something likeopen_topic
?Anyhow - perhaps that's food for thought & another PR.
Change checklist
[ ] Tests if relevant.