> ## 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 auth

> Authenticate with Porter using browser-based login, token-based authentication for CI/CD pipelines, or manual email and password via the CLI

`porter auth` contains commands for authenticating with Porter.

***

## `porter auth login`

Authenticate with your Porter account. By default, this opens your browser to complete authentication.

**Usage:**

```bash theme={null}
porter auth login [flags]
```

**Options:**

| Flag      | Description                    |
| --------- | ------------------------------ |
| `--token` | Log in using an existing token |

<CodeGroup>
  ```bash Browser Login (Default) theme={null}
  porter auth login
  ```

  ```bash Token Login theme={null}
  porter auth login --token <YOUR_TOKEN>
  ```
</CodeGroup>

<Info>
  After logging in, Porter automatically sets your default project and cluster if you have access to any. You can view these with `porter config`.
</Info>

***

## `porter auth logout`

Log out from Porter and clear your local credentials.

**Usage:**

```bash theme={null}
porter auth logout
```

<Tip>
  After logging out, you'll need to run `porter auth login` again before using other commands.
</Tip>
