Skip to content

feat(cli): add openshell gateway list subcommand #1173

@maxdubrinsky

Description

@maxdubrinsky

Problem Statement

diagnose_port_conflict() in crates/openshell-bootstrap/src/errors.rs:248
prints this when openshell gateway start hits a port conflict:

Or stop other openshell gateways:
  openshell gateway list && openshell gateway destroy --name <name>

But openshell gateway list doesn't exist. The closest thing today is
running openshell gateway select with no argument, which falls through
to a listing in non-interactive mode (crates/openshell-cli/src/run.rs:919).

Proposed Design

Add List to GatewayCommands that calls the existing
run::gateway_list(&cli.gateway). Starting with no parameters to keep the
change small; we probably want to add the ones from sandbox list
(--limit, --offset, --ids, --names, --selector) sometime soon.

Alternatives Considered

Update the hint in errors.rs:248 to point at gateway select instead.
Simple enough if we want to treat gateways and sandboxes as different —
there is no sandbox select, after all. But we already have sandbox list,
so adding gateway list matches and feels right.

Agent Investigation

  • Dead reference: crates/openshell-bootstrap/src/errors.rs:248 — only
    occurrence of openshell gateway list in the tree.
  • run::gateway_list() already renders the table at
    crates/openshell-cli/src/run.rs:1349; only invoked from the
    gateway_select_with helper at run.rs:919.
  • Sibling variants (Logout, Select, Info) at main.rs:1009-1033
    establish the shape to mirror.
  • No changes to run.rs, no protobuf or server changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliCLI-related workarea:gatewayGateway server and control-plane workstate:agent-readyApproved for agent implementation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions