Skip to content

marcoieni/multicheese

Repository files navigation

multicheese

logo

multicheese is a CLI that opens authenticated pages in Google Chrome through Playwright and saves one full-page PNG screenshot per URL.

Why it uses managed profiles

Current Chrome and Playwright releases do not support safely automating your normal Chrome profile. Instead, multicheese manages its own persistent Chrome profiles under:

  • macOS: ~/Library/Application Support/multicheese/profiles/<profile>
  • Linux: ${XDG_DATA_HOME:-~/.local/share}/multicheese/profiles/<profile>
  • Windows: %APPDATA%\\multicheese\\profiles\\<profile>

This keeps authentication working across runs without depending on unsupported remote-debugging flows.

You do not need to close every Chrome window on your laptop. You only need to avoid using the same multicheese profile in two multicheese sessions at the same time.

Requirements

  • macOS, Linux, or Windows
  • Node.js 20+
  • pnpm
  • Google Chrome installed

Install

Install dependencies:

pnpm install

Build the CLI:

pnpm build

Install it locally:

pnpm install:local

This writes a small launcher script that points at this checkout's built CLI:

  • macOS and Linux: ~/.local/bin/multicheese
  • Windows: %LOCALAPPDATA%\\multicheese\\bin\\multicheese.cmd

If you move the repo, run pnpm install:local again.

If that directory is on your PATH, the command will be available as:

multicheese

Alternative global install:

pnpm link --global

Usage

1. Create or open an authenticated profile

multicheese auth open work

Chrome opens with the managed profile. Log in to the websites you need, then return to the terminal and press Enter. The session data stays on disk for the next run.

List available profiles:

multicheese auth list

2. Prepare a job folder

Run the command from a separate folder, not from the project root.

That folder must contain one file named urls.csv.

The following can also be present:

  • zero or more directories named screenshotsNNN
  • optional hidden files like .DS_Store or .gitkeep

Example:

/tmp/my-job
├── urls.csv
├── screenshots000/
└── screenshots001/

urls.csv must contain one URL per row. It may be headerless or use a single url header:

https://example.com
https://example.com/docs

or

url
https://example.com
https://example.com/docs

3. Capture screenshots

multicheese run --profile work --workspace /tmp/my-job

Options:

  • --profile <name>: managed profile to use
  • --workspace <dir>: job folder to validate and process
  • --wait-ms <ms>: extra time to wait after each page load, default 10

Each run creates the next output directory:

  • first run: screenshots000
  • second run: screenshots001
  • third run: screenshots002

Output files are named from the URL and prefixed with the CSV order, for example:

001-example-com.png
002-example-com-docs.png
003-example-com-products-widget-a1b2c3d4.png

Development

Useful commands:

pnpm dev -- auth list
pnpm lint
pnpm format
pnpm format:check
pnpm typecheck
pnpm test

About

Take screenshots of multiple URLs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors