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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@google-psat/cli

v0.11.0-1

Published

CLI tool for analysis

Downloads

458

Readme

Privacy Sandbox Analysis Tool CLI

The Privacy Sandbox Analysis Tool CLI is designed to help developers audit and analyze their websites in Chrome environments where the unrestricted use of 3P cookies has been blocked.

Using the CLI

PSAT CLI allows you to audit a single website or multiple websites using a sitemap or a CSV file. It generates a report to help users draft future action items to prepare their websites for environments where the unrestricted use of 3P cookies has been blocked.

Required Node Version: 18 or later

Installation

npm i -g @google-psat/cli

Usage

psat -u https://example.com

By default, PSAT generates the report as an HTML file. You can open it in a web browser of your choice and use it to filter the output.

CLI option

Usage: npm run cli [website-url] -- [options]

CLI to test a URL for 3p cookies.

Arguments:
  website-url                    The URL of a single site to analyze

Options:
  -V, --version                  output the version number
  -u, --url <url>                The URL of a single site to analyze
  -s, --source-url <url>         The URL of a sitemap or CSV to analyze
  -f, --file <path>              The path to a local file (CSV or XML sitemap) to analyze
  -n, --number-of-urls <num>     Limit the number of URLs to analyze (from sitemap or CSV)
  -d, --display                  Flag for running CLI in non-headless mode (default: false)
  -v, --verbose                  Enables verbose logging (default: false)
  -o, --out-dir <path>           Directory to store analysis data (JSON, CSV, HTML) without launching the dashboard
  -i, --ignore-gdpr              Ignore automatically accepting the GDPR banner if present (default: false)
  -q, --quiet                    Skips all prompts; uses default options (default: false)
  -c, --concurrency <num>        Number of tabs to open in parallel during sitemap or CSV analysis (default: 3)
  -w, --wait <num>               Number of milliseconds to wait after the page is loaded before generating the report (default: 20000)
  -l, --locale <language>        Locale to use for the CLI, supported: en, hi, es, ja, ko, pt-BR (default: "en")
  -b, --button-selectors <path>  The path to a json file which contains selectors or button text to be used for GDPR banner acceptance
  -h, --help                     Display help for command

To learn more, visit our wiki: https://github.com/GoogleChromeLabs/ps-analysis-tool/wiki.

Output

After running the analysis, it will create a report in /out/ directory

psat -u https://www.google.co.in
✓ Done analyzing cookies.
Report created successfully: /Users/username/projects/psat-cli-tool/out/www-google-co-in/report_2024-07-31_14-41-27.html

Open the generated HTML file in the browser.

PSAT CLI Output

Docs

  • Learn more about the Privacy Sandbox initiative.
  • Visit our wiki for more information about PSAT.
  • Please refer to the CLI output section on our wiki for a better understanding of the reports.
  • To learn about cookie filters, check the Cookie table section on the wiki.

Contributing

We welcome your patches and contributions to this project. Whether you're a frequent contributor or addressing a specific issue that matters to you, we appreciate your input.

To develop and contribute, please refer to our contribution guide for detailed information.

Using PSAT in Chrome extension

PSAT is available as a Chrome extension that allows you to do an analysis while interacting with websites.

Installation:

You can install the PSAT extension from the Chrome web store

To run it: Visit the website you want to analyze, open Chrome DevTools, and select the Privacy Sandbox panel.

PSAT Chrome Extension