How to use gcalcli

If you spend a lot of time at the terminal, you might like to access your Google Calendar at the shell too. A great tool to do this is gcalcli. It shows information from all your calendars in Google Calendar, in various formats and using colors.


From Ubuntu archives

To install:

$ sudo apt install gcalcli

Note that this is an old version, it did not work for me.

From Python Package Index

To install:

$ sudo pip install gcalcli

This worked without problems on Ubuntu 14.04, but had problems on Ubuntu 15.04.

Build from source

Before you install gcalcli, first install the Python libraries that it depends on:

$ sudo apt install python-gflags python-googleapi

After this, clone gcalcli from its Github repository:

$ git clone

Finally, install gcalcli using its file:

$ cd gcalcli
$ sudo python install


The gcalcli project has a Client ID and Client Secret registered with Google to access its API. You need to authorize it to access your Google account only the first time. To do this, call gcalcli with any of its options, for example:

$ gcalcli agenda

This opens a Google URL in your browser asking whether you want to authorize gcalcli to access your Calendar. Authorize it and come back to the terminal. Let the gcalcli command exit or just kill it. gcalci would have stored the authorization information in ~/.gcalcli_oauth.

From here on, you can call gcalcli with any of its options and it works using the stored authorization information.

To view your events for the next few days:

$ gcalcli agenda

To view your calendar for this week:

$ gcalcli calw

To view your calendar for this week and the following week:

$ gcalcli calw 2

Tried with: Ubuntu 14.04 and Ubuntu 15.04

4 thoughts on “How to use gcalcli

  1. Thanks for this tutorial! You can actually install gcalcli with a one-liner: sudo pip install git+


  2. Things are not working. I used Marko’s one-liner, then ran “$ gcalcli agenda”, but it returned, in bold red font: “Error: must specify a username”


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.