A simple CLI utility for grabbing URL-/origin-level Core Web Vitals using the Chrome User Experience Report (CrUX) API
npm install crux-lookupA simple CLI utility for grabbing URL-/origin-level Core Web Vitals histograms using the Chrome User Experience Report (CrUX) API. Results are returned visually or as unaltered JSON from the CrUX API.
1. Install the utility via NPM
``shell`
$ npm i -g crux-lookup
2. Add a CrUX API Key
You can get a (free) CrUX API key here.
`shell`
$ crux-lookup config --updateKey
3. Query a URL or origin
`shell`
$ crux-lookup https://www.google.com --origin # omit --origin to get results for the page at the submitted URL
Viewing, removing or changing your stored API Key
`shell`
$ crux-lookup config # run without options to view the currently stored API key
Options:
- --updateKey Add/update a CrUX API key to use for queries--removeKey
- Remove stored CrUX API key from configuration
Looking up a URL or origin
`shell`
$ crux-lookup
Arguments:
- url URL for which to get CrUX record
Options:
- -r, --origin Look up the origin of the submitted URL-j, --json
- Output raw JSON from CrUX-o, --output
-