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

Create styled screenshots, raw screenshots, batch jobs, and watch-mode previews from the command line.

## Styled capture

```bash
screenframed capture https://example.com \
  --device browser-macos \
  --background midnight \
  --shadow \
  --output screenshot.png
```

`--background` accepts a named preset such as `midnight` or a hosted background reference such as `fractal-glass-gradients/fractal-glass-34`.

## Useful flags

| Flag | Purpose |
|---|---|
| `--project <id>` | Scope the capture to a project. |
| `--auth-profile <id>` | Use a stored auth profile for private pages. |
| `--device <device>` | Set device or browser chrome. |
| `--device-color <color>` | Set a physical device color. |
| `--background <value>` | Use a gradient preset or hosted background ref. |
| `--shadow` | Apply the default soft shadow. |
| `--perspective <value>` | Apply a perspective preset. |
| `--title`, `--subtitle` | Add structured text overlays. |
| `--ai`, `--ai-style`, `--ai-copy` | Enable AI styling or copy. |
| `--element <text>` | Describe an element to capture. |
| `--selector <selector>` | Capture a CSS selector. |
| `--wait-for <value>` | Use `load`, `networkidle`, `domcontentloaded`, or milliseconds. |
| `--block <items>` | Comma-separated block list. |
| `--inject-css <css>` | Inject CSS before capture. |
| `--cache-ttl <seconds>` | Override cache TTL. |
| `--format <format>` | `png`, `jpg`, or `webp`. |
| `--width`, `--height` | Set output dimensions. |
| `--json` | Print the API response as JSON. |
| `--url-only` | Print only the image URL. |
| `--no-download` | Do not download the generated image. |

## Print only the image URL

```bash
screenframed capture https://example.com --url-only
```

## JSON response

```bash
screenframed capture https://example.com --json
```

Use `--json` while debugging because it requests resolved params from the API.

## Element capture

```bash
screenframed capture https://example.com/pricing \
  --selector "[data-capture='pricing-table']" \
  --background arctic \
  --output pricing.png
```

```bash
screenframed capture https://example.com \
  --element "the pricing cards section" \
  --background arctic \
  --output pricing.png
```

## AI-styled capture

```bash
screenframed capture https://example.com \
  --ai-style \
  --ai-copy \
  --json
```

## Async job

```bash
screenframed capture https://example.com \
  --async \
  --webhook-url https://example.com/webhooks/screenframed
```

Then poll:

```bash
screenframed jobs status job_01K... --watch
```

## Batch file

```bash
screenframed batch urls.txt \
  --device browser-macos \
  --background arctic \
  --out-dir screenshots
```

The file should contain one URL per line. Empty lines and lines starting with `#` are ignored.

## Watch mode

```bash
screenframed watch http://localhost:3000 \
  --interval 5 \
  --output preview.png
```

## Raw capture

```bash
screenframed raw https://example.com --output raw.png
```

Use raw captures for debugging. Use styled captures for published assets.