Summary
opencli browser supports --window, but the option only works when attached to the parent browser command:
opencli browser beehiiv --window background open https://example.com
The more obvious leaf-command placement fails:
opencli browser beehiiv open https://example.com --window background
# error: unknown option '--window'
Repro
Version:
opencli --version
# 1.8.2
Working:
opencli browser beehiiv --window foreground open https://example.com
opencli browser beehiiv --window background open https://example.com
OPENCLI_WINDOW=background opencli browser beehiiv open https://example.com
Failing:
opencli browser beehiiv open https://example.com --window foreground
# error: unknown option '--window'
Also confusing:
shows --window <mode>, but:
opencli browser beehiiv open --help
does not show --window, so it looks unsupported on the leaf command.
What seems to be happening
--window is implemented, but it is registered on the parent browser command rather than the leaf subcommands. So placement matters in a way that is not obvious from the UX.
Expected
One of:
- Accept
--window in the common leaf position too, e.g. ... open <url> --window background, or
- Keep the current parser behavior, but make the help/docs much more explicit that the correct form is:
opencli browser <session> --window <foreground|background> <subcommand> ...
I hit this while trying to keep automation in a background window. The feature works; the command shape is just easy to misuse.
Summary
opencli browsersupports--window, but the option only works when attached to the parentbrowsercommand:The more obvious leaf-command placement fails:
opencli browser beehiiv open https://example.com --window background # error: unknown option '--window'Repro
Version:
opencli --version # 1.8.2Working:
Failing:
opencli browser beehiiv open https://example.com --window foreground # error: unknown option '--window'Also confusing:
shows
--window <mode>, but:does not show
--window, so it looks unsupported on the leaf command.What seems to be happening
--windowis implemented, but it is registered on the parentbrowsercommand rather than the leaf subcommands. So placement matters in a way that is not obvious from the UX.Expected
One of:
--windowin the common leaf position too, e.g.... open <url> --window background, orI hit this while trying to keep automation in a background window. The feature works; the command shape is just easy to misuse.