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

byj-pupshot

v1.0.0

Published

Simple CLI to take screenshots with Puppeteer

Readme

Puppeteer Screenshot CLI

Puppeteer로 특정 URL의 스크린샷을 찍어 저장하는 간단한 CLI 스크립트입니다.

설치

패키지로 설치

npm i byj-pupshot

로컬 개발

npm init -y
npm i puppeteer

사용법

패키지 설치 후

byj-pupshot --url https://example.com

npx로 바로 실행

npx byj-pupshot --url https://example.com
./screenshot.js --url https://example.com --full-page

주요 옵션

  • --url <URL>: 대상 URL (필수)
  • --path <FILE>: 저장 경로 (기본: ./out/<time>_<hostname>.<ext>)
  • --type <png|jpeg|webp>: 이미지 포맷 (기본: png)
  • --quality <0-100>: JPEG/WEBP 품질
  • --full-page: 전체 페이지 캡처
  • --clip x,y,w,h: 특정 영역 캡처
  • --viewport w,h: 뷰포트 크기 (기본: 1280,720)
  • --device-scale <number>: deviceScaleFactor
  • --omit-background: 배경 투명 (PNG)
  • --wait-until <event>: load | domcontentloaded | networkidle0 | networkidle2
  • --timeout <ms>: 네비게이션 타임아웃 (기본: 30000)
  • --delay <ms>: 캡처 전 추가 대기
  • --wait-selector <css>: 특정 셀렉터 대기
  • --user-agent <string>: User-Agent 설정
  • --http-auth <user:pass>: HTTP Basic Auth
  • --headers-json <json>: 추가 헤더 JSON
  • --cookies-json <json>: 쿠키 JSON 배열
  • --headless / --no-headless: 헤드리스 모드 설정

헤더/쿠키 환경변수

헤더

PUPPETEER_HEADERS='{"X-Test":"1","Authorization":"Bearer ..."}' \
./screenshot.js --url https://example.com --path out.png

쿠키(JSON 배열)

PUPPETEER_COOKIES='[{"name":"sid","value":"abc","domain":"example.com"}]' \
./screenshot.js --url https://example.com --path out.png

쿠키 문자열

도메인/URL이 없는 쿠키는 대상 URL로 자동 보정됩니다.

PUPPETEER_COOKIE_STRING='a=b; c=d' \
./screenshot.js --url https://example.com --path out.png

예시

PUPPETEER_HEADERS='{"X-Test":"1"}' \
PUPPETEER_COOKIES='[{"name":"sid","value":"abc","domain":"example.com"}]' \
./screenshot.js --url https://example.com --path out.png --full-page

주의사항

  • --clip--full-page는 동시에 사용할 수 없습니다.
  • --qualityjpeg 또는 webp일 때만 적용됩니다.