# auth (/docs/cli/auth)

> For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL.

Sign in to your Prisma account from the CLI, sign out, and manage workspace sessions.

Location: CLI > auth

Use `auth` commands to manage authentication for the platform commands. Signing in opens a browser flow and stores a session. Every platform command in that environment reuses that session.

## Usage [#usage]

  

#### bun

```bash
bunx prisma@latest auth login
bunx prisma@latest auth whoami
```

#### pnpm

```bash
pnpm dlx prisma@latest auth login
pnpm dlx prisma@latest auth whoami
```

#### yarn

```bash
yarn dlx prisma@latest auth login
yarn dlx prisma@latest auth whoami
```

#### npm

```bash
npx prisma@latest auth login
npx prisma@latest auth whoami
```

## Commands [#commands]

| Command                              | Description                                           |
| ------------------------------------ | ----------------------------------------------------- |
| `auth login`                         | Log in to your Prisma platform account (browser flow) |
| `auth logout`                        | Clear stored authentication credentials               |
| `auth whoami`                        | Show the authenticated user and accessible workspace  |
| `auth workspace list`                | List your workspace sessions                          |
| `auth workspace use [id-or-name]`    | Make one of your workspace sessions current           |
| `auth workspace logout <id-or-name>` | End one workspace session                             |

`auth login` signs you in through the browser. Afterward, anything running in that environment inherits the session, including coding agents. For CI, set [`PRISMA_SERVICE_TOKEN`](https://www.prisma.io/docs/cli/configuration#platform-environment-variables) instead.

## Related pages

- [`branch`](https://www.prisma.io/docs/cli/branch): List platform branches for a project.
- [`bucket`](https://www.prisma.io/docs/cli/bucket): Create and manage object-store buckets.
- [`Configuration`](https://www.prisma.io/docs/cli/configuration): Configure Prisma 8 CLI commands with prisma.config.ts and global flags.
- [`contract emit`](https://www.prisma.io/docs/cli/contract-emit): Emit Prisma 8 contract artifacts.
- [`contract infer`](https://www.prisma.io/docs/cli/contract-infer): Infer a starter contract from an existing database.