By server I mean start a temporary web server inside the game
A custom accounts system for your own game. Your can connects to your extenal accounts system on a public server (which you are trying to avoid having) and fetchs the linked twitch account access token and uses that.
The CLI starts a temporary web sever to capture oAuth codes for exchange for tokens
I was suggesting you could copy the proceedure not the code itself.
TLDR:
The primary ways to get a token into a game are
user copy pastes the token
you start a temporary web server to handle the oAuth steps
you run a server external to the game on the web to handle oAuth and pass the token into the game somehow (Theres a variety of methods that can work)