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

get-chrome-from-puppeteer

v1.3.0

Published

Install Chrome for Testing via @puppeteer/browsers and return its executable path

Readme

get-chrome-from-puppeteer

Install Chrome for Testing via @puppeteer/browsers and return its executable path.

Install

npm install get-chrome-from-puppeteer

CLI

# Get Chrome stable (default) — prints the executable path
npx get-chrome-from-puppeteer

# Specific version
npx get-chrome-from-puppeteer 130
npx get-chrome-from-puppeteer 130.0.6723.58

# Channels
npx get-chrome-from-puppeteer canary
npx get-chrome-from-puppeteer beta

# JSON output
npx get-chrome-from-puppeteer --json

# Re-install if newer build available
npx get-chrome-from-puppeteer --update

# Install system dependencies (Debian/Ubuntu, requires root)
npx get-chrome-from-puppeteer --install-deps

# Custom cache directory
npx get-chrome-from-puppeteer --cache-dir /tmp/browsers

# Custom download mirror
npx get-chrome-from-puppeteer --base-url https://my-mirror.example.com

# Quiet mode (no progress bar)
npx get-chrome-from-puppeteer -q

# Only print path if already installed (no download)
npx get-chrome-from-puppeteer --path-only

# Install Chromium instead of Chrome for Testing
npx get-chrome-from-puppeteer --chromium

Shell integration

# Use in scripts
CHROME=$(npx -y get-chrome-from-puppeteer)
$CHROME --headless --dump-dom https://example.com

Options

| Option | Description | | -------------------- | ------------------------------------------------------------------------------------------------------- | | [version] | Chrome version: stable (default), canary, beta, dev, milestone (130), exact (130.0.6723.58) | | --json | Output as JSON { executablePath, buildId } | | --update | Re-install if a newer build is available | | --install-deps | Install system dependencies (Debian/Ubuntu, requires root) | | --cache-dir <path> | Custom cache directory | | --base-url <url> | Custom download mirror URL | | --quiet, -q | Suppress download progress output | | --path-only | Only print path if installed, don't download | | --chromium | Install Chromium instead of Chrome for Testing | | --help, -h | Show help | | --version, -v | Show package version |

Environment variables

| Variable | Description | | ------------------------ | ---------------------------------------------------- | | GET_CHROME_VERSION | Chrome version (same as positional arg) | | GET_CHROME_UPDATE | Set to 1 or true to re-install if newer | | GET_CHROME_INSTALL_DEPS| Set to 1 or true to install system deps | | GET_CHROME_CACHE_DIR | Custom cache directory | | GET_CHROME_BASE_URL | Custom download mirror URL | | GET_CHROME_QUIET | Set to 1 or true to suppress progress | | GET_CHROME_PATH_ONLY | Set to 1 or true to skip download | | GET_CHROME_CHROMIUM | Set to 1 or true to install Chromium | | GET_CHROME_JSON | Set to 1 or true for JSON output |

Programmatic API

import { getChrome } from "get-chrome-from-puppeteer";

const { executablePath, buildId } = await getChrome();
console.log(executablePath);
// /home/user/.cache/puppeteer-browsers/chrome/linux-130.0.6723.58/chrome-linux64/chrome

// With options
const result = await getChrome({
  version: "canary",
  update: true,
  installDeps: true,
  cacheDir: "/tmp/browsers",
});

getChrome(options?): Promise<GetChromeResult>

Options

| Option | Type | Default | Description | | ---------- | --------- | -------------- | ------------------------------------------------ | | version | string | "stable" | Chrome version tag, milestone, or exact build ID | | update | boolean | false | Re-install if a newer build is available | | installDeps | boolean | false | Install system dependencies (Debian/Ubuntu, requires root) | | cacheDir | string | system default | Custom cache directory | | baseUrl | string | Google's CDN | Custom download mirror URL | | quiet | boolean | false | Suppress download progress output | | pathOnly | boolean | false | Only return path if installed, don't download | | chromium | boolean | false | Install Chromium instead of Chrome for Testing |

Result

| Field | Type | Description | | ---------------- | -------- | ----------------------------------------------------------------------------------- | | executablePath | string | Absolute path to the Chrome executable | | buildId | string | Resolved build ID (e.g. "130.0.6723.58") |

License

MIT