Tasksync is a tool to keep Taskwarrior and Todoist in sync with each other.
- Store your Todoist API key as an environment variable. You can find this in the Todoist desktop or web applications in Settings -> Integrations -> Developer -> API Token.
echo "export TODOIST_API_KEY=foobar123" >> ~/.bash_profile
- Install
tasksync
into your Python environment of choice and install the Taskwarrior hook scripts:
git clone git@github.com:kgoettler/tasksync.git
python3 -m pip install tasksync/
python3 tasksync/install_hooks.py
-
Run
tasksync start
to start the tasksync service. Now whenever tasks are created and/or updated in Taskwarrior, corresponding tasks will be created and/or updated in Todoist. -
(Optional) Run
tasksync pull
to pull all existing tasks from Todoist into Taskwarrior.
Once the hook scripts are installed, the Tasksync service can be controlled via the tasksync
CLI:
tasksync -h
usage: tasksync [-h] [-v] {start,stop,status,pull} ...
tasksync: start/stop/status of the tasksync server
positional arguments:
{start,stop,status,pull}
start start the tasksync service
stop stop the tasksync service
status status the tasksync service
pull pull updates from Todoist into Taskwarrior
optional arguments:
-h, --help show this help message and exit
-v, --version print version
tasksync start
will start the background servicetasksync stop
will stop the background servicetasksync status
will indicate whether the background service is runningtasksync pull
will immediately sync changes from Todoist -> Taskwarrior
Tasksync runs as a background service which receives notifications about newly added or modified tasks from Taskwarrior and sends the corresponding updates to Todoist. Tasksync receives notifications via Taskwarrior hook scripts, and sends updates to Todoist via the Todoist Sync API. Updates are not sent synchronously; Tasksync only sends updates to Todoist after 10 seconds have elapsed without any updates from Taskwarrior. This provides several benefits:
- Taskwarrior hooks are not blocked by network calls
- Runtime with synchronous network calls: ~800ms
- Runtime with tasksync: ~100ms
- Todoist Sync API calls can be batched
- Syncing can be disabled by simply shutting down the service
- Support for adding, deleting, and modifying tasks
- Support for due dates
- Support for projects
- Improved CLI for interacting with tasksync server
- Implement sync tool (-> Taskwarrior)
- Implement sync tool (-> Todoist)
- Formalize logging by tasksync server
- Support for subtasks
- Support for annotations