It would be great if this had a CLI tool, so that it could be used as an alternative to yt-dlp. Or a web frontend as an alternative to Invidious, which breaks more often than not. That said, I wouldn't be surprised if Google issues a C&D, or just inevitably breaks it, especially if it uses undocumented APIs.
1. Install NodeJS and NPM (if you don't already have it)
2. Create a new folder
3. Run "npm install youtubei.js@latest" in that folder
4. Create a new file in this folder called ytdl.js (or whatever you like)
5. See section "Downloading videos:" on the github page. Make the contents of the file exactly like that. i.e. just cut/paste that example.
6. Replace line 'Looking for life on Mars - documentary' with the name of the youtube video you want to download (ideally this should come from args)
7. Run "node ytdl.js" and it should download