> ## Documentation Index
> Fetch the complete documentation index at: https://docs.instapods.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Authentication

> Log in and manage your CLI session.

## Login

The CLI supports two authentication methods:

### Browser OAuth (Default)

```bash theme={null}
instapods login
```

This opens your browser for a secure OAuth PKCE flow. After authorizing, the token is saved to `~/.instapods/config.json`.

### Email/Password

```bash theme={null}
instapods login --email you@example.com --use-password
```

You'll be prompted for your password. The session token is saved locally.

## Check Current User

```bash theme={null}
instapods whoami
```

Displays your email, user ID, and current team.

## Logout

```bash theme={null}
instapods logout
```

Removes the saved token from your local configuration.

## Token Management

The CLI stores the auth token in `~/.instapods/config.json`. You can also set it via environment variable:

```bash theme={null}
export INSTAPOD_TOKEN=your-token-here
```

This is useful for CI/CD pipelines and automation scripts.

## Social Login

You can also sign up or log in via **GitHub** or **Google** on the web at [app.instapods.com](https://app.instapods.com). After logging in via social auth, use `instapods login` (browser OAuth) to authenticate the CLI with the same account.
