From 99544cccd766cf991b700e0fc84d4d4289b8e7bc Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 15:01:16 +0000 Subject: [PATCH] docs: document --json flag for porter cluster list --- .../cli/command-reference/porter-cluster.mdx | 15 +++++++++++++-- standard/cli/command-reference/porter-cluster.mdx | 13 ++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) 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.