Screenshot CLI

I built a small open-source tool called Screenshot CLI.

It does exactly what the name suggests – takes screenshots from the command line.

It’s written in TypeScript and uses Playwright under the hood. You can point it at a list of URLs or just pass in one site, and it will spit out clean screenshots. The idea started as a quick way to document and test pages without having to click around manually.

Along the way I added a couple of extra features:

  • It can generate before-and-after comparisons if you want to track changes between versions of a page.
  • There’s a simple HTML and PDF report generator, so you can keep a tidy record of what you captured.
  • All the data gets stored in .jsonc files, which means you can re-run reports later without taking screenshots again.

The project is open source, and I’ve tried to keep the code readable and modular so others can fork it or extend it.

You can find it here: https://github.com/refactorau/screenshot-cli

If you try it out and have suggestions, feel free to open an issue or send a pull request.