Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions crates/openshell-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,13 @@ enum GatewayCommands {
#[arg(long, env = "OPENSHELL_GATEWAY", add = ArgValueCompleter::new(completers::complete_gateway_names))]
name: Option<String>,
},

/// List registered gateways.
///
/// Prints a table of all registered gateways with their endpoint, type,
/// and authentication mode. The active gateway is marked with `*`.
#[command(help_template = LEAF_HELP_TEMPLATE, next_help_heading = "FLAGS")]
List,
}

// -----------------------------------------------------------------------
Expand Down Expand Up @@ -1956,6 +1963,9 @@ async fn main() -> Result<()> {
.unwrap_or_else(|| "openshell".to_string());
run::gateway_admin_info(&name)?;
}
GatewayCommands::List => {
run::gateway_list(&cli.gateway)?;
}
},

// -----------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/sandboxes/manage-gateways.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ One gateway is always the active gateway. All CLI commands target it by default.
List all registered gateways:

```shell
openshell gateway select
openshell gateway list
```

Switch the active gateway:
Expand Down
Loading