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

# CLI Login

Authenticate the ScreenFramed CLI with the browser-based device flow.

Run:

```bash
screenframed login
```

The CLI prints a verification URL, opens a browser when possible, waits for approval, and stores the returned scoped key in `~/.screenframed.json`.

## Non-interactive usage

For CI and scripts, avoid interactive login:

```bash
screenframed capture https://example.com \
  --api-key "$SCREENFRAMED_API_KEY" \
  --output screenshot.png
```

Or set:

```bash
export SCREENFRAMED_API_KEY="sf_live_..."
```

## Check status

```bash
screenframed status
```

## Logout

```bash
screenframed logout
```

## Device flow API

The CLI uses [Device Login](/api/device-login) under the hood. You usually do not need to call those endpoints directly unless you are building your own CLI or integration.