-
Notifications
You must be signed in to change notification settings - Fork 0
[DX-786] Streamline Global Flags #146
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
99b9745
Streamline global flags so commands only expose what they need
umair-ably cac20ce
regenerate readme
vladvelici 07dc49c
update readme
vladvelici 463ad54
fix readme
umair-ably e9977a2
adds missing client id flags
umair-ably 65d9590
replace flags with env vars in E2E tests
umair-ably 2353bc9
updates claude.md
umair-ably 2c239c3
Merge branch 'main' into DX-786-global-commands
umair-ably 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 hidden or 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
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
@coderabbitai what do you think about using
runCommand(["channels", "publish", "my-channel", "hello", "--api-key", key]);vsSince ably-cli is mainly a cli tool, its easier to pass access-token directly right? Do you think both options should be provided
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.
@sacOO7, great question — this is essentially a security vs. usability tradeoff, and the PR has made a deliberate architectural call. Here's the reasoning behind each side:Why flags (
--api-key) feel natural for a CLI tool--helpoutput, making auth self-documentingably channels publish my-channel hello --api-key app.key:secretis conciseWhy the PR chose env vars only
~/.bash_history,~/.zsh_history) and in the process list (ps aux), potentially leaking secretsably loginstores credentials once; env vars override for scripting. There's no need for a third mechanismShould both be supported?
Supporting both would directly conflict with the PR's stated goal:
Adding
--api-keyback as a flag on individual commands would reintroduce the very problem this PR is solving — proliferating auth flags across all commands.If discoverability is a concern, a middle ground worth considering (without reverting the design) would be to mention env vars in the
--helpoutput or in a dedicatedably auth --helpsection. But supporting both as equivalent CLI options would undermine the security and UX simplification goals of this PR.