Repository navigation
Description
User Story
I use OpenShell daily to work across multiple gateways and workspaces, passing --gateway and --workspace on most commands. I need shorter flag spellings that match the existing gw and ws subcommand aliases, so that commands are quicker to type and consistent.
Problem Statement
The openshell CLI already accepts gw and ws as aliases for the gateway and workspace subcommands. The global flags have no matching spellings: --gateway has only the short form -g, and --workspace has no short form or alias. Users must type the full flag names, and the flags are inconsistent with the subcommand aliases.
Impact / Why This Matters
Users who switch between gateways and workspaces type --gateway and --workspace repeatedly. Today they can set OPENSHELL_GATEWAY and OPENSHELL_WORKSPACE or define shell aliases. That works for a fixed target but not for one-off overrides, and it does not make the flags consistent with the gw and ws subcommand aliases.
Proposed Design
Accept --gw as an alias of --gateway and --ws as an alias of --workspace. Both remain global flags. The aliases keep the same environment variables (OPENSHELL_GATEWAY, OPENSHELL_WORKSPACE), defaults, and shell completion as the full flags. Existing spellings, including -g, continue to work.
Suggested UX (if applicable)
openshell --gw prod --ws team-a sandbox list
openshell sandbox list --gw prod --ws team-aAcceptance Criteria
-
--gw <name>selects the gateway exactly as--gateway <name>does, before or after the subcommand. -
--ws <name>selects the workspace exactly as--workspace <name>does, before or after the subcommand. - Both aliases appear in help output.
- Shell completion works for both aliases.
- Existing flags,
-g, and theOPENSHELL_GATEWAYandOPENSHELL_WORKSPACEenvironment variables are unchanged. - Published CLI docs mention the aliases where the full flags are documented.
Alternatives Considered
- Setting
OPENSHELL_GATEWAYandOPENSHELL_WORKSPACEin the environment. This suits a fixed target but is clumsy for per-command overrides. - Shell aliases or functions. These are per-user, undiscoverable from
openshell --help, and do not carry completion.
Activity
feat(cli): add --gw and --ws aliases for --gateway and --workspace