Skip to Content
🎉 ShotSweep is live! Launched on NFSFU234 Open Source Day.
DocsInstallation

Installation

Install ShotSweep globally with npm:

terminal
npm install -g @nfsfu234/shotsweep

ShotSweep uses Playwright and requires Chromium for screenshot capture, installed automatically via a postinstall script.

If npm blocks the install script

Recent npm versions can block a package’s lifecycle scripts (like postinstall) until explicitly allowed. If you see a warning like:

npm warn install-scripts 1 package had install scripts blocked npm warn install-scripts @nfsfu234/[email protected] (postinstall: playwright install chromium || true)

Allow ShotSweep’s install script before installing:

terminal
npm config set allow-scripts=@nfsfu234/shotsweep --location=user npm install -g @nfsfu234/shotsweep

This setting is saved to your user config, so you won’t need to repeat it for future ShotSweep installs or upgrades.

Note: Don’t use npm install-scripts approve @nfsfu234/shotsweep for a global install — that command approves scripts for packages inside a project’s node_modules, and will fail with ENOMATCH for a global package since there’s nothing local for it to match against. Use npm config set allow-scripts=... instead, as shown above.

Windows

Open Command Prompt or PowerShell and run:

terminal
npm config set allow-scripts=@nfsfu234/shotsweep --location=user npm install -g @nfsfu234/shotsweep

If you already installed ShotSweep

If you installed before setting allow-scripts, set it now and reinstall so the postinstall script gets a chance to run:

terminal
npm config set allow-scripts=@nfsfu234/shotsweep --location=user npm uninstall -g @nfsfu234/shotsweep npm install -g @nfsfu234/shotsweep

Installing Chromium manually

If you’d rather not allow install scripts, or the automatic download fails on a restrictive network, install Chromium directly:

terminal
npx playwright install chromium

One-time installation (no persistent config)

Useful for CI or a machine where you don’t want to save the setting:

terminal
npm install -g @nfsfu234/shotsweep --allow-scripts=@nfsfu234/shotsweep

Running without a global install

Run ShotSweep on demand with npx, without installing it globally:

terminal
npx --allow-scripts=@nfsfu234/shotsweep @nfsfu234/shotsweep capture --url https://example.com

Verify the installation

terminal
shotsweep --help

You should see the top-level commands: capture, login, diff.

terminal
shotsweep --version

Troubleshooting

npm install-scripts approve fails with ENOMATCH

npm error code ENOMATCH npm error No installed packages match: @nfsfu234/shotsweep

You’re running the project-scoped approval command against a global install. Use this instead:

terminal
npm config set allow-scripts=@nfsfu234/shotsweep --location=user npm install -g @nfsfu234/shotsweep

shotsweep is not recognized

Check npm’s global prefix is on your PATH:

terminal
npm prefix -g

Restart your terminal, then try shotsweep --help again.

Next step

Continue to the Quick Start to capture your first screenshot.

Last updated on