Installation

Requirements

  • Node.js >= 18 or Bun >= 1.0
  • Chrome or Chromium (peek auto-detects system Chrome; if none is found, it downloads Chromium on first use)
  • macOS for native app capture (optional)

Install via npm

npm install -g peek

Install via Bun

bun install -g peek

Verify Installation

peek --version

Chrome Detection

peek uses a 3-tier strategy to find a browser:

  1. System Chrome – Detected via chrome-launcher. If you have Chrome installed, peek uses it automatically.
  2. Cached Chromium – If no system Chrome is found, peek checks ~/.cache/peek/ for a previously downloaded Chromium.
  3. Auto-download – If neither is found, peek downloads Chromium (~150MB) on first use and caches it for future runs.

You never need to install a browser manually.

Quick Start

# Screenshot a web page
peek snap http://localhost:3000 -o /tmp/shot.png

# Screenshot a native macOS app window
peek snap --app "Finder" -o /tmp/finder.png

# Run layout checks
peek check http://localhost:3000 --format json

# Auto-detect framework, start dev server, check routes
peek dev --routes /,/about,/settings

Commands Overview

CommandDescription
peek snap <url>Screenshot a web page or native app window
peek check <urls...>Run layout verification checks on one or more URLs
peek devAuto-detect framework, start dev server, and check routes
peek scene <manifest>Run spatial checks on a scene manifest JSON (game engines)
peek pool statusShow browser pool status
peek pool killKill the pooled browser
peek cleanRemove temporary screenshot files from /tmp/peek/