npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@elysiumoss/ui-capture

v0.1.1

Published

Effect-based crawler that walks a website and captures full-page screenshots (PNG/WebP/JPEG) and optional multi-quality videos for every reachable internal route.

Readme

ui-capture

Overview

ui-capture drives a headless Chromium via Playwright to crawl a site, follow internal links up to a configurable depth, and snapshot every reachable route across multiple viewports. It is built on Effect for structured concurrency, retries, and predictable cleanup.

For each route it produces:

  • PNG — lossless, taken once into a buffer.
  • WebP — real WebP, encoded by piping the PNG buffer through ffmpeg/libwebp.
  • JPEG — Playwright's native JPEG.
  • Video (optional) — recordVideo master at 1× plus 0.75× / 0.5× transcodes via ffmpeg/libvpx-vp9.

It also writes a capture-report.json and REPORT.md to the output directory.

Requirements

  • Bun ≥ 1.x or Node ≥ 20.19
  • Chromium (auto-installed by Playwright)
  • ffmpeg on PATH (or pass --ffmpeg)

Installation

bun add -g @elysiumoss/ui-capture
# or
npm i -g @elysiumoss/ui-capture

Then install Playwright's Chromium browser once:

bunx playwright install chromium

CLI

Usage: ui-capture <url> [options]

Arguments:
  <url>                       Starting URL to crawl

Options:
  --output-dir <path>         Output directory (default: ./ui-captures)
  --max-depth <n>             Maximum crawl depth (default: 2)
  --wait <ms>                 Per-page wait after networkidle (default: 2000)
  --concurrency <n>           Parallel route workers (default: 2)
  --include-subdomains        Crawl subdomains of the starting host
  --allowed-hosts <a,b,...>   Extra allowed hostnames (comma separated)
  --viewports <spec,spec>     Viewport specs as name:WIDTHxHEIGHT
                              (default: desktop:1920x1080,tablet:768x1024,mobile:375x667)
  --hide <sel,sel,...>        CSS selectors to hide before screenshotting
  --menu-selectors <sel,...>  Selectors to click before link discovery
  --video                     Capture videos in addition to screenshots
  --video-duration <ms>       Video duration when --video (default: 10000)
  --no-interactions           Disable scripted scrolling during video
  --no-warmup                 Skip the pre-screenshot warm-up scroll
  --ffmpeg <path>             ffmpeg binary path (default: ffmpeg)
  --help                      Show this message

Examples:
  ui-capture https://example.com
  ui-capture https://example.com --video --max-depth 1 --concurrency 4
  ui-capture https://example.com --viewports desktop:1920x1080,mobile:390x844

Library

import { Effect } from "effect";
import {
  CaptureConfigLive,
  UICaptureService,
} from "@elysiumoss/ui-capture";

const program = Effect.gen(function* () {
  const service = yield* UICaptureService;
  return yield* service.captureWebsite("https://example.com");
}).pipe(
  Effect.provide(UICaptureService.Default),
  Effect.provide(
    CaptureConfigLive({
      outputDir: "./ui-captures",
      maxDepth: 1,
      captureVideo: true,
    }),
  ),
);

await Effect.runPromise(program);

Output layout

ui-captures/
├── REPORT.md
├── capture-report.json
└── <route>/
    ├── screenshots/
    │   ├── png/{<viewport>_WxH_latest.png, history/<viewport>_WxH_<ts>.png}
    │   ├── webp/{...}
    │   └── jpg/{...}
    └── videos/                              # only when --video
        ├── high-quality/<viewport>_WxH_<ts>.webm
        ├── medium-quality/...
        └── low-quality/...

Notes

  • Asset filtering — link discovery skips URLs whose pathname ends in common asset extensions (.css, .js, .png, .svg, .xml, .webmanifest, fonts, media, archives) so frameworks that expose chunk paths in __NEXT_DATA__ don't poison the crawl queue.
  • Warm-up scroll — before each screenshot pass, the page is scrolled top → bottom in steps and back, triggering IntersectionObserver-based lazy-loads and scroll-reveal animations. Disable with --no-warmup.
  • Parallax — true scroll-progress-driven parallax (pinned + transformed elements) renders at scroll=0 once warm-up returns to top. A stitched-capture mode for that case is on the roadmap.

License

MIT — see LICENSE.md.