--file-name
- CLI
- --file-name, -f
- REST
- CLI only
Writes the output to this path and infers the format from its extension. - writes to stdout. With several URLs, the files are numbered: web.png writes web-1.png, web-2.png and so on.
Without it, text goes to stdout: markdown, txt, html, axtree, axtree_json, llm_text, llm_json, and goal, the default under --navigate. Every other output goes to zshot-<timestamp>-<kind>.<extension> in the working directory, such as zshot-20261013T070820Z-image.png, and its name is printed.
Example
Write to a file:
CLI
Run locally
zshot --file-name document.pdf https://zshot-cli.com/Write a screenshot to STDOUT:
CLI
Run locally
zshot -f - https://zshot-cli.com/ > shot.pngWrite web-1.png, web-2.png and web-3.png:
CLI
Run locally
zshot --file-name web.png \
https://zshot-app.com/ \
https://zshot-cli.com/ \
https://scaleassembly.com/