LLM-assisted high-res marketing screenshots for SaaS apps (generic login via Playwright storage_state).
Project description
shots
Generic, open-source friendly tooling to capture high-res marketing screenshots of a SaaS app.
Key idea: you log in once manually; shots saves a Playwright storage_state.json. After that, it can run repeatedly headless, optionally guided by an LLM (vision) to navigate and/or crop.
Install
python -m venv .venv
source .venv/bin/activate
pip install -e ".[llm,yaml]"
playwright install chromium
Setup
cp shots.yaml.example shots.yaml # edit with your app's URL and shots
cp .env.example .env # add your OPENAI_API_KEY
Both shots.yaml and .env are gitignored.
1) One-time manual login
shots login --base-url https://your-app.example.com --out-dir shots_out
This writes shots_out/storage_state.json.
2) Run screenshots from a config
export OPENAI_API_KEY=...
shots run-config --config shots.yaml --use-llm --use-llm-crop --save-source
CLI flags
| Flag | Default | Description |
|---|---|---|
--config |
(required) | Path to YAML/JSON config file |
--out-dir |
from config, or shots_out |
Output directory (overrides config out_dir) |
--use-llm |
off | LLM-driven multi-step navigation |
--model |
gpt-5.2 |
OpenAI model for navigation/crop |
--use-llm-crop |
off | LLM picks a marketing-friendly crop rectangle |
--max-crop-retries |
2 |
Crop validation retry attempts |
--save-source |
off | Save uncropped source images alongside output |
--overwrite |
off | Force re-capture of all shots, ignoring per-shot overwrite settings |
--timeout-ms |
10000 |
Page-load / navigation timeout |
--action-timeout-ms |
5000 |
Timeout for clicks/typing (fail fast) |
--headed |
off | Show the browser window (debug) |
--viewport |
desktop |
Fallback viewport preset (desktop, laptop, tablet, mobile) |
--viewport-w, --viewport-h, --scale |
from preset | Override viewport dimensions |
--full-page |
from config/preset | Capture full scrollable page |
Config format (YAML)
Simple (flat shots list)
Each shot is auto-wrapped into its own group with output: png.
base_url: https://your-app.example.com
start: /app
out_dir: shots_out
defaults:
viewport_preset: desktop
full_page: true
max_nav_steps: 12
shots:
- id: dashboard-hero
description: >
Capture the main dashboard with KPI cards and a chart visible.
Close any modal, cookie banner, or tour overlay.
url: /app/dashboard
- id: integrations
description: >
Show Settings -> Integrations page listing available integrations.
viewport_preset: laptop
Groups (multi-shot PDFs, labels, folders)
Use groups instead of shots for more control. Each group produces either a single PNG or a multi-page PDF.
base_url: https://your-app.example.com
start: /app
out_dir: shots_out
defaults:
viewport_preset: desktop
full_page: true
max_nav_steps: 12
groups:
- id: hero-shots
output: png
shots:
- id: dashboard-hero
description: >
Capture the main dashboard.
url: /app/dashboard
- id: onboarding-deck
output: pdf
folder: onboarding
label: "{id} — {url}"
label_date: true
shots:
- id: step-1-welcome
description: Show the welcome screen.
url: /app/onboarding
- id: step-2-profile
description: Show the profile setup page.
url: /app/onboarding/profile
Config reference
| Field | Level | Description |
|---|---|---|
base_url |
top | (required) App base URL |
start |
top | Default start path (default: /) |
out_dir |
top | Output directory (default: shots_out, overridden by --out-dir) |
defaults.viewport_preset |
top | desktop | laptop | tablet | mobile |
defaults.full_page |
top | Capture full scrollable page |
defaults.max_nav_steps |
top | Max LLM navigation steps per shot (default: 12) |
defaults.overwrite |
top | Default overwrite behavior for all shots (default: false) |
shots |
top | Flat list of shots (cannot coexist with groups) |
groups |
top | List of shot groups (cannot coexist with shots) |
groups[].id |
group | (required) Group identifier |
groups[].output |
group | png (1 shot max) or pdf (multi-shot) |
groups[].folder |
group | Override output subfolder name (defaults to group id) |
groups[].label |
group | Label template applied to all shots ({id}, {url}, {title}) |
groups[].label_date |
group | Append UTC timestamp below label |
id |
shot | (required) Shot identifier |
description |
shot | (required) What to capture (used as LLM goal) |
url |
shot | Start URL for this shot (absolute or relative to base_url) |
viewport_preset |
shot | Override viewport for this shot |
viewport |
shot | Custom {width, height, scale} |
full_page |
shot | Override full-page capture for this shot |
label |
shot | Per-shot label override |
overwrite |
shot | If false (default), skip when output PNG already exists |
Notes
--use-llmenables multi-step navigation: the model sees a screenshot + accessibility tree each step and returns one action at a time until it saysdone.--use-llm-cropasks the model to choose a crop rectangle for marketing-friendly framing, with automatic validation and retry.- All navigation is kept same-origin as
base_url. - A detailed log is written to
<out_dir>/shots.logon every run. - If the LLM repeats a previously failed action, it is automatically re-queried with a different approach.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shots-0.2.3.tar.gz.
File metadata
- Download URL: shots-0.2.3.tar.gz
- Upload date:
- Size: 126.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1261c9e6591b8f22e99c993b5b9681d0fbf8b7923052bb167629187b0c8e6278
|
|
| MD5 |
014a2af7e9d7ffa1778cb0be0436e9ec
|
|
| BLAKE2b-256 |
bd29ef106b6b48bb80e93a0bd45a2d91c0006e83c0897e773a41da51702fd129
|
Provenance
The following attestation bundles were made for shots-0.2.3.tar.gz:
Publisher:
build.yml on gaussian/shots
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shots-0.2.3.tar.gz -
Subject digest:
1261c9e6591b8f22e99c993b5b9681d0fbf8b7923052bb167629187b0c8e6278 - Sigstore transparency entry: 997467151
- Sigstore integration time:
-
Permalink:
gaussian/shots@93c720a2e765c8a29f834c58a1edd181284ee0b1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gaussian
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@93c720a2e765c8a29f834c58a1edd181284ee0b1 -
Trigger Event:
pull_request_target
-
Statement type:
File details
Details for the file shots-0.2.3-py3-none-any.whl.
File metadata
- Download URL: shots-0.2.3-py3-none-any.whl
- Upload date:
- Size: 36.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9344655f7a0ab40b5763bc719160b635fb6a197410b0f8f0a70cac55a2f9a8e0
|
|
| MD5 |
4e67fb2b132e0bdb44d0e4cd1cbdc01d
|
|
| BLAKE2b-256 |
e65bb45889d55e258acf1debe582e597104c3a835b7931652150cf72505e3004
|
Provenance
The following attestation bundles were made for shots-0.2.3-py3-none-any.whl:
Publisher:
build.yml on gaussian/shots
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shots-0.2.3-py3-none-any.whl -
Subject digest:
9344655f7a0ab40b5763bc719160b635fb6a197410b0f8f0a70cac55a2f9a8e0 - Sigstore transparency entry: 997467190
- Sigstore integration time:
-
Permalink:
gaussian/shots@93c720a2e765c8a29f834c58a1edd181284ee0b1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gaussian
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@93c720a2e765c8a29f834c58a1edd181284ee0b1 -
Trigger Event:
pull_request_target
-
Statement type: