Skip to content

gotomi/kruk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kruk - a command line tool for CrUX REST API

Requirements

Installation

npm install -g kruk

Usage

➜  kruk --help

--key                     CrUX API key (required) (https://developers.google.com/web/tools/chrome-user-experience-report/api/guides/getting-started#APIKey)
--urls                    one or more comma seperated urls  (required)
--formFactor              allowed values: ALL_FORM_FACTORS, DESKTOP, TABLET, PHONE (default)
--ect                     allowed values: offline, slow-2G, 2G, 3G, 4G
--checkOrigin             get CrUX data for origin instead of given url
--output                  posible values: distribution, json, csv, table (default)

Usage:
kruk --key [YOUR_API_KEY] --urls www.google.com,www.bing.com --ect 4G
kruk --key [YOUR_API_KEY] --urls www.google.com,www.bing.com
kruk --key [YOUR_API_KEY] --urls www.google.com
kruk --key [YOUR_API_KEY] --urls www.google.com --checkOrigin
kruk --key [YOUR_API_KEY] --urls www.google.com,www.bing.com --formFactor DESKTOP
kruk --key [YOUR_API_KEY] --urls www.google.com,www.bing.com --formFactor TABLET --ect 3G

Example output

table

➜  kruk --key [YOUR_API_KEY] --urls www.x-kom.pl,www.morele.net --checkOrigin

table

distribution

➜  kruk --key [YOUR_API_KEY] --urls www.google.com,www.bing.com --checkOrigin --output distribution

table