This set of tools allow to manage caldav and carddav collections from the cli.
vdirsyncer is the one that syncs the collections.
khal is used to visualise the .ics calendar files
khard manages the .vcf contact files
To install vdirsyncer the “easy and clean” way,
pipsi install vdirsyncer
And be sure to have lixml2-dev, libxlst-dev and python-xx-dev installed.