Agents are good at using CLIs. I setup an alias on my Google account and set up Himalaya email cli. Works great. https://github.com/pimalaya/himalaya