"I recently came across the GoogleCL project, which provides a
command-line interface to various Google tools (e.g.., Calendar and
YouTube). It's a fairly recent project not currently available via
Debian or Ubuntu, but you can download and install a .deb file from
the project page.
"The first time you run each command, you'll need to open a
browser to log into your Google account and authorize access to
console using w3m, but a graphical browser worked fine. After
specifying the username and granting access that first time, it
works automatically for future uses."