diff --git a/enterprise/cli/command-reference/porter-cluster.mdx b/enterprise/cli/command-reference/porter-cluster.mdx index de497754..94bbdd7d 100644 --- a/enterprise/cli/command-reference/porter-cluster.mdx +++ b/enterprise/cli/command-reference/porter-cluster.mdx @@ -13,8 +13,19 @@ description: "List available clusters, view cluster configuration details, and m ### `porter cluster list`[](#porter-cluster-list "Direct link to heading") -This lists all clusters under a certain project. +This lists all clusters under a certain project. The default output renders a formatted table with each cluster's name, provider, region, status, and creation date, with the name hyperlinked to its dashboard page in supported terminals. + +**Flags:** + +| Flag | Description | +|------|-------------| +| `--json` | Print clusters as JSON instead of a table. Useful for piping into tools like `jq` in scripts. | + +**Example:** +```bash +porter cluster list --json | jq '.[].name' +``` ### `porter cluster namespace list`[](#porter-cluster-namespace-list "Direct link to heading") -This lists all namespace in a cluster. This is a good mechanism to check that you are properly authenticated to a cluster. \ No newline at end of file +This lists all namespace in a cluster. This is a good mechanism to check that you are properly authenticated to a cluster. diff --git a/standard/cli/command-reference/porter-cluster.mdx b/standard/cli/command-reference/porter-cluster.mdx index b84a01db..d77dd848 100644 --- a/standard/cli/command-reference/porter-cluster.mdx +++ b/standard/cli/command-reference/porter-cluster.mdx @@ -14,13 +14,24 @@ description: "List clusters and view cluster details including node groups, Kube ## `porter cluster list` -List all clusters in the current project. +List all clusters in the current project. The default output renders a formatted table with the cluster name, provider, region, status, and creation date. Cluster names are hyperlinked to their dashboard page in supported terminals. **Usage:** ```bash porter cluster list ``` +**Flags:** + +| Flag | Description | +|------|-------------| +| `--json` | Print clusters as JSON instead of a table. Useful for piping into tools like `jq` in scripts. | + +**Example:** +```bash +porter cluster list --json | jq '.[].name' +``` + Use `porter config set-cluster` to switch between clusters after listing them.