Use curl to get remote file size.
$ npm install -g curl-size
$ curl-size $URL
# Example, reponse with a Content-Length header
$ curl-size http://downloadap1.teamviewer.com/download/TeamViewer.dmg
26 MB
# No Content-Length header
$ curl-size https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js
Be patient, downloading the file...
875 KB
MIT © EGOIST