Are there some command line tools (or libraries) out there to access a gmail account, e.g. to read unread messages, download messages, etc.?
If you like Vim there is a gem called Vmail. The cool thing about Vmail is that its keybindings are similar to Gmail's keyboard shortcuts. So for instance, to archive a message in Gmail you type
e. In Vmail you type
Yay, vim! Discovered it already a few weeks back; thanks for completing the list here!– mikuFeb 17, 2011 at 10:22
I was interested until I read, "Developed using Ruby" May 14, 2021 at 19:43
Simply use the IMAP- or POP3-protocol and a client or library to access the emails.
The Google Command Line Tool might provide such support in the future. Right now it is limited to Blogger, Calendar, Contacts, Docs, Picasa and Youtube.
You can do this using Postfix and Fetchmail. See here: http://souptonuts.sourceforge.net/postfix_tutorial.html
You've got two questions here.
Are there libraries? Yup - but you'll want to mention a programming language of choice. All of them have some library associated for interacting with the google suite.
Are there command line tools? Yup. You can use good old Mutt or Pine. I've also heard good things about Sup and it seems to be oriented towards gmail style usage.