On the command line, you can use PageSpeed Insights :
Install via: $ npm install --global psi
Usage: $ psi <url> --key=<key> --prettyprint=<true> --userIp=<userIp> --locale=<locale> --strategy=<desktop|mobile>
Run it like this: $ psi http://stackoverflow.com

Also for mobile ideas: $ psi http://stackoverflow.com --strategy=mobile

UPDATE: you can use PageSpeed Insights properties in your local development environment (Internet connection required) with grunt + grunt-pagespeed + ngrok . Checkout an example project for grunt-pagespeed and ngrok for more information.
Note. Run $ ngrok -authtoken <your-token> 80
and check the web interface settings to make sure you set the correct port in Gruntfile.js
!
source share