What for? there's already Gemini CLI (https://github.com/google-gemini/gemini-cli) for that, unless I'm missing some crucial feature not supported by that.

Gemini and AI Studio websites, and also Antigravity, have generous free tiers (at least for now). Not so much over API/CLI.