Taskwarrior turned my Linux terminal right into a retro to-do checklist that syncs with Google Calendar and Keep

I’d by no means imagined that I’d be utilizing a process supervisor from the Linux terminal. Using instructions to create to-do lists as an alternative of utilizing a cool-looking GUI with shade customization choices. That’s till I came across Taskwarrior. It’s a free, open-source process supervisor that is additionally easy to make use of. But that is the purpose. It can replace other bloated desktop apps.
Now, I discovered a option to lengthen its functionality even additional. With a developer named bergercookie’s syncall venture, you possibly can sync Taskwarrior bidirectionally with Google Calendar, Keep, and different fashionable providers.
I’ve a behavior of storing my duties in a number of locations
I wanted a central system to handle all my duties
Over the years, I’ve used many apps and providers for managing duties. Google Keep, Sheets, Asana, ClickUp, and lots of different complicated task management apps. The factor is, every did one thing adequate to maintain utilizing it. For instance, Google Keep is great at quick to-do creation. ClickUp is nice for managing massive duties with a number of subtasks and deadlines.
The drawback was that I had no option to set up all these duties throughout separate apps. I may maybe use one other app to take care of all my to-dos scattered all through my workflow. But that simply added yet one more factor to take care of.
I wanted a system that might sync my process lists throughout all the duty managers I used to be utilizing. Since Taskwarrior was one thing I used to be keen on, I solely wanted to attach it to the opposite providers.
Luckily, I came upon about Syncall. It’s a gateway to attach your Taskwarrior duties to Google apps and different process software program. At first look, the documentation felt like gibberish. After working via it step-by-step, I lastly synced my duties with Google Keep and occasions on Calendar.
Syncing Google Calendar and Keep with Taskwarrior
Bridging the hole from the consolation of the terminal
The very first thing I attempted was syncing Taskwarrior with my Google Calendar. I needed to create a Google Cloud venture, allow the Google Calendar API, arrange an OAuth consumer, and extra. The drawback is, in the event you learn the syncall documentation alone, you will get caught on quite a lot of steps. Here are the complete steps I went via:
-
Install syncall with pipx, utilizing the google and tw extras:
pipx set up "syncall[google,tw]". - If syncall complains about lacking packages, run pipx inject syncall “setuptools. Newer setuptools eliminated a module it wants.
- Create a venture within the Google Cloud console and allow the Calendar API.
- Set up the OAuth consent display. Under Google Auth platform -> Audience, add your individual Google account as a take a look at person.
- Create an OAuth consumer ID of sort Desktop app, then obtain its JSON file.
- Run the sync command with –google-secret pointing to that file. It prints a sign-in hyperlink. Open it, approve the entry, and the primary sync begins.
I added a process with a remindme tag and a 3 PM due time. Then I ran tw_gcal_sync -c “TW Reminders” -t remindme –google-secret ~/client_secret.json within the terminal. The client_secret.json file is the JSON file I downloaded from my Google Cloud venture.
Then I went to my calendar, and the occasion was certainly created. My process additionally confirmed up there.
Now, one catch is that it is not an computerized sync. Your Taskwarrior duties will not seem in your calendar except you run the sync command each time. To make issues a bit simpler, you possibly can use aliases in the Linux terminal.
Google Keep is feasible too, however solely in a single path
Syncall’s Keep sync works on one guidelines word with Show checkboxes turned on. It syncs every merchandise’s textual content, checked state, and deletion. While going via the method, I discovered some roadblocks that quite a lot of you won’t like. Not solely is the method cumbersome, however it additionally depends on a third-party, unofficial library referred to as gkeepapi.
As a consequence, you must enter your Google username and password for authentication. I adopted the gpsoauth docs. Here’s the method:
1. Install syncall with the gkeep and tw extras. The second line fixes the missing-module error from the setuptools change.
pipx set up "syncall[gkeep,tw]"
pipx inject syncall "setuptools
2. Open the Google EmbeddedSetup web page, check in, and click on I agree. The web page might load slowly, so simply ignore it.
https://accounts.google.com/EmbeddedSetup
3. Copy the worth of the oauth_token cookie out of your browser. In Chrome, press F12 and open Application -> Cookies. In Firefox, open Storage > Cookies. Pick the accounts.google.com entry. The worth begins with oauth2_4/.
4. Exchange that cookie for a grasp token with gpsoauth. My first strive returned UnhealthyAuthentication, however a contemporary cookie labored. Then set GKEEP_USERNAME, GKEEP_TOKEN, and GKEEP_PASSWD as environment variables in the terminal you will sync from. The password simply wants some worth.
5. Start Python from the syncall atmosphere.
~/.native/share/pipx/venvs/syncall/bin/python
6. Then paste the traces beneath. The final argument may be any 16-character hex string. A profitable consequence prints a token that begins with aas_et/.
import gpsoauth
r = gpsoauth.exchange_token("[email protected]", "PASTE_OAUTH_TOKEN_HERE", "0123456789abcdef")
print(r.get("Token"), r.get("Error"))
Exit Python with exit(). Then export the variables in the identical terminal you will sync from:
export GKEEP_USERNAME="[email protected]"
export GKEEP_TOKEN="PASTE_MASTER_TOKEN_HERE"
export GKEEP_PASSWD="placeholder"
7. Run tw_gkeep_sync -t keeptest -k “TW Keep Test”. According to syncall’s code, it reads your credentials from atmosphere variables or the move password supervisor. To strive it, add a process with the tag, then sync:
process add "Item from terminal" +keeptest
tw_gkeep_sync -t keeptest -k "TW Keep Test"
I do know it is fairly some setup. But it lastly labored for me. A process I added within the terminal confirmed up in my Keep word. Then I marked it carried out and synced once more, and Keep confirmed it as accomplished.
However, an merchandise I created in Keep by no means reached Taskwarrior. The sync hit a date error from Taskwarrior 3.5.0, and a lacking move folder brought about a second error on the finish. That one got here after the sync had already completed. So, Keep labored in a single path for me.
gkeepapi says a grasp token has full entry to your Google account, so shield it like a password.
My scattered to-dos lastly have a house within the terminal
That took quite a lot of time, analysis, and back-and-forth between my browser and the terminal to lastly get it working. But it lastly paid off. I can now handle my duties and occasions from the minimalistic terminal, and one sync command handles every little thing else. Sure, two-way syncing did not work for me. However, Taskwarrior has now joined my very own checklist of CLI tools I install on every Linux system.
