psi-local-cli

PageSpeed Insights for localhost via ngrok

Usage no npm install needed!

<script type="module">
  import psiLocalCli from 'https://cdn.skypack.dev/psi-local-cli';
</script>

README

psi-local-cli

Google PageSpeed Insights CLI for localhost projects via ngrok.

Install

npm i psi-local-cli -g

Examples

psi-local --port 8080
# will test http://localhost:8080 via ngrok tunnel
psi-local --port 8080 --route /signup
# will test http://localhost:8080/signup via ngrok tunnel
psi-local --port 8080 --nopsi
# will just create tunnel for http://localhost:8080 without calling PSI
# you can manually copy-paste generated ngrok url to PSI web interface

All psi-cli options are supported:

psi-local --port 8080 --strategy mobile
# will test http://localhost:8080 via ngrok tunnel and pass `strategy` to psi-cli

MIT Licensed