Save the file below as run_lighthouse.sh
, then make it executable with
chmod +x run_lighthouse.sh
Use like this:
./run_lighthouse.sh YOUR_WEBSITE_URL YOUR_CPU_SLOWDOWN N
The script presumes that you already have Lighthouse CLI and jq
installed.
More information available in a blog post here.