gdirect is a simple command line tool which will generate direct download Google Drive urls from your shareable urls.
npm install gdirect -g
gdirect https://drive.google.com/file/d/XYZ/view?usp=sharing
Note: the script is very basic and does nothing fancy, just a quick replace but is helpful if you are dealing with direct downloads all the time. If you want to parse additional urls, please make a pull request :)