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

fpa-cli

v1.1.0

Published

Lightweight CLI to analyze frontend performance

Downloads

186

Readme

fpa-cli

Frontend Performance Analyzer — A lightweight CLI tool to analyze frontend performance using Google Lighthouse and Puppeteer.

License: MIT npm version

fpa-cli helps developers quickly audit web pages from the terminal. It runs a headless browser, captures Core Web Vitals, and provides a concise color-coded summary or a full HTML report.

Features

  • Automated Audits: Runs Google Lighthouse programmatically via Puppeteer.
  • Multi-Device Support: Switch between Mobile (default) and Desktop emulation presets.
  • Performance Budgets: Set a threshold score; the CLI will exit with an error if the site fails (perfect for CI/CD pipelines).
  • Reliability: Run multiple audits automatically and select the median result to reduce variance.
  • Core Web Vitals: Instant checks for LCP, FCP, CLS, TBT, and Speed Index.
  • Report Export: Option to save the full Lighthouse HTML report locally.

Installation

You can run it directly using npx (recommended) or install it globally.

Using npx (No install required)

npx fpa-cli -u https://example.com

Global Installation

npm install -g fpa-cli

🛠 Usage

Basic Analysis (Mobile Default)

Run a quick performance check on a URL:

fpa-cli -u https://www.google.com

Desktop Analysis

Analyze the page using desktop screen emulation settings:

fpa-cli -u https://www.google.com --preset desktop

CI/CD Performance Budget

Fail the build (exit code 1) if the performance score is below 90:

fpa-cli -u https://www.google.com --threshold 90

High Reliability Mode

Run the audit 3 times and select the median result to account for network variance:

fpa-cli -u https://www.google.com --runs 3

Save HTML Report

Analyze a URL and save the detailed Lighthouse report to a file:

fpa-cli -u https://github.com -o ./report.html

Options

| Option | Alias | Description | Default | | --- | --- | --- | --- | | --url <url> | -u | The target URL to analyze | Required | | --output <path> | -o | Path to save the full HTML report | null | | --threshold <number> | -t | Performance threshold (0-100). Fail if score is below this. | null | | --preset <type> | -p | Device preset: mobile or desktop | mobile | | --runs <number> | -r | Number of runs to calculate the median score | 1 | | --no-throttle | | Disable network and CPU throttling | false | | --version | -V | Output the version number | | | --help | -h | Display help for command | |

Metrics Explained

The CLI outputs the following metrics directly to your console:

  • Performance Score: Overall Lighthouse performance category score (0-100).
  • FCP (First Contentful Paint): When the first text or image is painted.
  • LCP (Largest Contentful Paint): Render time of the largest image or text block.
  • TBT (Total Blocking Time): Time the main thread was blocked.
  • CLS (Cumulative Layout Shift): Visual stability of the page.
  • Speed Index: How quickly content is visually displayed.

Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes using Conventional Commits
  4. Push to the branch
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.