---
name: zshot
description: >-
  Browses the web and captures pages with the zshot CLI or a zshot MCP server.
  Drives a real browser one action at a time to search, follow links, log in,
  fill web or PDF forms, and upload or download files. Captures URLs or local
  HTML as screenshots (PNG, JPEG, WebP, PDF, GIF, ASTC, KTX), video (WebM, MP4),
  Markdown, rendered HTML/MHTML, AXTree, HAR, Chrome traces, CPU/memory pprof
  profiles, or web archives (WARC, WACZ, SQLite). Use when a task needs a
  rendered web page, and for visual checks, accessibility audits, performance
  profiling, broken-link checks, QA recording/replay, or running Playwright,
  Puppeteer, and WebDriver suites on zshot.
license: Proprietary. Run `zshot --open-source-licenses` for bundled OSS terms.
metadata:
  source: zshot --install-skill
  version: "0.68.1"
---

# zshot

`zshot` renders URLs and local HTML files in headless Chromium. Use it whenever
a task needs the rendered page rather than raw HTTP source.

## Default workflow for browsing tasks

For multi-step tasks—searching, following links, logging in, filling forms—
drive a navigator session yourself, one action per step:

1. Read [references/agent-navigation.md](references/agent-navigation.md) for
   frames and actions.
2. With a `zshot` MCP server connected, read
   [references/navigation-sessions.md](references/navigation-sessions.md) and
   call `zshot:session_start`, `zshot:session_act`, and `zshot:session_finish`.
   Otherwise read
   [references/navigation-stdio.md](references/navigation-stdio.md) and use the
   CLI `stdio` navigator.
3. Allow other origins the task crosses with `--navigator-allow-url`, or
   `navigator_allow_url` over MCP.
4. Confirm the last frame shows the goal is met, then finish.

To fill a web or PDF form, start a navigator session on the form's URL or file:
open it, enter the values, and export the filled copy with `-t download`, or
`output_type: "download"` over MCP. When the CLI fails and a `zshot` MCP server
is connected, use the session tools, and the reverse. For a video, enable
recording when the session starts. Edit a PDF locally only after naming the
navigator limitation that blocks entering a value or exporting the result.
[references/navigation-sessions.md](references/navigation-sessions.md) has a
worked PDF example.

Use standalone captures for known URLs. When the user requests zshot-only
browsing, report blockers instead of switching tools.

## Basic usage

```sh
zshot [OPTIONS] <URL> -f <OUTPUT_FILE>
```

- Positional input: `https://…` URL, local file path, or `-` for HTML on stdin.
- `-f, --file-name <PATH>`: selects output format from extension. Use `-f -`
  for stdout. Without `-f`, text formats (`markdown`, `txt`, `html`, `axtree`,
  `llm_text`, `llm_json`, `goal`) write to stdout; binary formats write to a
  printed `zshot-*` path.
- `-t, --output-type <TYPE>`: overrides format detection when an extension is
  ambiguous or omitted.

```sh
zshot https://example.com -f shot.png
zshot https://example.com -t markdown
```

## Task reference

| Goal | Format / Flag | Read |
|------|---------------|------|
| Screenshot, PDF, GIF, video, or GPU texture | PNG / JPEG / WebP / PDF / GIF / WebM / MP4 / ASTC / KTX | [references/screenshot.md](references/screenshot.md) |
| Network, CPU, memory profiling, or console logs | HAR / trace / pprof / `--log-level info` | [references/performance.md](references/performance.md) |
| Accessibility audit or vision simulation | AXTree / axe audit / `--emulate-vision-deficiency` | [references/accessibility.md](references/accessibility.md) |
| Extract readable text | Markdown | [references/content.md](references/content.md) |
| Capture rendered DOM or offline bundle | HTML / MHTML | [references/structure.md](references/structure.md) |
| Archive or crawl a site for replay or SQL | WARC / WACZ / SQLite | [references/archival.md](references/archival.md) |
| Find broken links and missing anchors | SQLite crawl + `scripts/linkcheck.sql` | [references/link-check.md](references/link-check.md) |
| Browse, fill forms, upload, download, fill PDFs | navigator session | [references/agent-navigation.md](references/agent-navigation.md), then [references/navigation-sessions.md](references/navigation-sessions.md) or [references/navigation-stdio.md](references/navigation-stdio.md) |
| Record/replay QA tests with video evidence | navigator session + `--cdp` | The navigator files above, then [references/qa-test.md](references/qa-test.md) |
| Run Playwright, Puppeteer, or WebDriver on zshot | `--cdp` | [references/cdp.md](references/cdp.md) |
| License tiers, trial, leases, installing in a workspace | `--trial`, `--license-lease` | [references/licensing.md](references/licensing.md) |

## MCP server

If a `zshot` MCP server is connected, prefer its tools for standalone captures
so results return inline without temp files:

- `zshot:render` — takes `url` and optional `output_type` (`png`, `jpg`, `webp`,
  `pdf`, `gif`, `webm`, `mp4`, `har`, `trace`, `pprof_cpu`, `pprof_memory`,
  `axtree`, `markdown`, `html`, `mhtml`, `warc`, `wacz`, `sqlite`, `astc`,
  `ktx`; setting `navigate` defaults `output_type` to `goal`). Returns images
  inline, text as text, HAR/AXTree/JSON under `result`, and large/binary files
  as `zshot://render/…` resource links.
- `zshot:session_start`, `zshot:session_act`, `zshot:session_finish` — drive a
  navigator session step by step, as
  [references/navigation-sessions.md](references/navigation-sessions.md)
  describes.
- `zshot:list_emulation_devices` — returns valid `device` IDs for `render`.
- `zshot:fetch_resource` — fetches bytes for `zshot://render/…` links when the client
  does not auto-resolve resources. A file over 768 KiB comes back as a file
  path on a local server and as a URL to GET on an HTTP server. A local
  server's render summary names each file's path on disk, under
  `--mcp-local-server-resource-directory`.

Most CLI flags map directly to `render` parameters with snake_case names. Key
differences: `--header` → `header` array, `--cookie` → `cookie` array,
`--no-fail` → `fail` (default `true`), `--emulate-mobile-device` →
`emulate_mobile`, `-x`/`-y` → `browser_width`/`browser_height`.

## Common flags

- `-x, --browser-width <W>` / `-y, --browser-height <H>` — viewport, default 1920×1080.
- `--full-page` — capture full scrollable height.
- `--device <NAME>` — emulate a preset from `zshot --device-list`.
- `--wait-for <BOUNDARY>` — `load` (default), `networkidle0`, seconds like `2.5`,
  `css:.selector`, `js:eventName`, `text:Report ready` once the page shows that text, or
  `notext:Please wait` once it no longer does.
- `-H, --header "Name:Value"` / `--cookie "name=value; Domain=example.com"` — repeatable.
- `--user-agent <STRING>` — override User-Agent.
- `--javascript <CODE>` / `--javascript-file <PATH>` — inject JS before capture.
- `--timeout <SECONDS>` — render timeout; `0` disables.
- `--emulate-timezone <IANA_TZ>` / `--accept-language <LANGUAGES>` — the
  timezone and languages pages see, such as `America/New_York` and `en-US,en`.

## Signed-in sites and storage

Read cookies and localStorage from a local browser profile read-only, CLI only:

- `--storage-chrome-profile`, `--storage-firefox-profile`,
  `--storage-safari-profile` — bare uses default profile, `=PATH` uses that
  directory. `--storage-chrome-profile=PATH` also reads Brave, Edge, Arc,
  Vivaldi, and Opera. Only the target site and `--navigator-credential-origin`
  sites are seeded; avoid `*` globs.
- Tell the user before running: macOS Chrome-family profiles prompt for
  Keychain access, Linux uses `secret-tool`, and Safari requires Full Disk
  Access or exits 3. Pass `--storage-chrome-profile-key KEY` when no keyring
  key is available.

Use `--storage state.json` to seed and save Playwright `storageState` JSON, or
`--storage ro:state.json` to seed read-only. Treat saved files containing
profile cookies as secrets and delete them when done. Over MCP and HTTP, use
`with_storage`.

## Authoritative docs

```sh
zshot --help            # categories
zshot --help <category> # ZShot, Browser, Document, Image, Video, Archive, Security, Navigator, Server, Diagnostics
zshot --help all        # all flags with license tiers
zshot --agent-help      # concise agent overview
```

Full machine-readable docs: <https://zshot-cli.com/llms.txt> and
<https://zshot-cli.com/llms-full.txt>.

## Skill version and installation

`metadata.version` records the zshot version that installed this skill. When
zshot prints `AGENT NOTICE:` on stderr about a newer version, run
`zshot --install-skill` to update.

## Licensing and installing zshot

A command that fails with a license error needs a higher tier or a lease: read
[references/licensing.md](references/licensing.md), which also covers installing
zshot in a container or cloud workspace.
