youtube-dl
official site is this
https://rg3.github.io/youtube-dl/
you can download the exe and add it to the path you that you can access anywhere. or you can download through nodejs
very-well written documentation of how and what are the parameters are passed...