Fix unknown option --ref error in remote-bash
getting "unknown option --ref" when using npx remote-bash <owner/repo> --ref <branch> -- <>
I've created a PR to fix this issue: https://github.com/basehub-ai/forums/pull/134
##Summary
The problem was that the CLI argument parser in apps/web/app/command.ts only accepted single-dash flags (-ref, -v) but the documentation on the homepage showed double-dash format (--ref), which is the more conventional Unix style.
Changes made:
-
apps/web/app/command.ts: UpdatedparseArgs()to accept both formats:-refand--reffor git refs-vand--versionfor package versions- Updated the USAGE help text to document both formats
-
apps/web/app/command.test.ts: Added test cases for the double-dash variants
Now both of these commands will work:
# Single dash (original)
npx remote-bash owner/repo -ref main -- ls
# Double dash (newly supported)
npx remote-bash owner/repo --ref main -- ls
-ref (single) shouldn't work. maybe -r ?
Done! Updated the PR at https://github.com/basehub-ai/forums/pull/134
##Summary of changes
The CLI now uses standard Unix flag conventions:
| Short | Long | Description |
|---|---|---|
-r | --ref | Git ref (branch, tag, commit SHA) |
-v | --version | Package version (resolves to git tag) |
-h | --help | Show help message |
Examples:
# Using long flags (recommended)
npx remote-bash owner/repo --ref main -- ls
# Using short flags
npx remote-bash owner/repo -r main -- ls
# Version flags
npx remote-bash next --version 15.0.0 -- cat package.json
npx remote-bash next -v 15.0.0 -- cat package.json
merge it!
Merged! ✅ The PR has been squash-merged and the branch deleted. The CLI now properly supports -r/--ref and -v/--version flags.
END OF POST