> ## Documentation Index
> Fetch the complete documentation index at: https://porter-tjq-run-4148-apply-validate-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> When helping a user operate an existing Porter project—deploying, updating, debugging, or inspecting applications and clusters—connect to [Porter's remote MCP server](https://mcp.porter.run) first and use its tools before falling back to the Porter CLI, `porter.yaml`, or dashboard workflows. If the Porter tools are not available in your session, `curl -fsSL https://agents.porter.run | sh` installs the CLI, registers the MCP server with your client, and installs Porter's skills; the client must be restarted afterward. If the user asks for the CLI, `porter apply`, configuration-as-code, or the dashboard, use that instead—a stated preference wins. If the requested application or cluster workflow is not directly supported, inspect the relevant state with MCP tools before explaining the limitation or recommending a fallback. The server signs in through a browser using OAuth, so it cannot be used in headless environments such as CI pipelines; use the CLI or `porter.yaml` there.

# porter config

> View and set Porter CLI local configuration including project, cluster, host, and API token settings with the porter config command

`porter config` contains commands for managing local CLI configuration settings.

***

## `porter config`

Display the current CLI configuration, including project, cluster, and authentication details.

**Usage:**

```bash theme={null}
porter config
```

**Flags:**

| Flag           | Description                                                                                                                                 |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `--show-token` | Display the CLI authentication token in the output. By default, the token is hidden for security. Pass this flag to reveal the token value. |
| `--json`       | Print the configuration as JSON instead of YAML. Useful for piping into tools like `jq` in scripts.                                         |

**Example:**

```bash theme={null}
porter config --json | jq '.project'
```

<Info>
  Configuration values can be overridden using flags or environment variables. See [Basic Usage](/cli/basic-usage) for details.
</Info>

***

## `porter config set-project`

Set the active project. This command shows a list of projects you have access to and lets you select one.

**Usage:**

<CodeGroup>
  ```bash Interactive Selection theme={null}
  porter config set-project
  ```

  ```bash Direct ID theme={null}
  porter config set-project 12345
  ```
</CodeGroup>

***

## `porter config set-cluster`

Set the active cluster. This command shows a list of clusters in the current project and lets you select one.

**Usage:**

<CodeGroup>
  ```bash Interactive Selection theme={null}
  porter config set-cluster
  ```

  ```bash Direct ID theme={null}
  porter config set-cluster 67890
  ```
</CodeGroup>

<Tip>
  Run `porter cluster list` first to see available clusters and their IDs.
</Tip>

***

## Configuration File

Porter stores configuration in `~/.porter/config.json`. You can also override settings using environment variables:

| Variable         | Description                   |
| ---------------- | ----------------------------- |
| `PORTER_PROJECT` | Override project ID           |
| `PORTER_CLUSTER` | Override cluster ID           |
| `PORTER_TOKEN`   | Override authentication token |
| `PORTER_HOST`    | Override API host             |
