qcard is a CLI addressbook application for CardDAV servers written in Go. In contrast to other tools it does not cache anything. It can fetch multiple servers / addressbooks in parallel which makes it quite fast.
Its main purpose is displaying addressbook data. Nevertheless it supports basic creation and editing of entries.
This simply displays all contacts from all addressbooks:
This only shows contacts from addressbook 0:
qcard -a 0
This displays all avaliable addressbooks with their numbers and colors:
This searches for contacts containing "doe" in all addressbooks:
qcard -s doe
The DetailThreshold parameter in the configuration file determines when all contact details are shown for a given numer of search results. For instance, on DetailTreshold = 3 you get all details if 3 or less contacts are found for the searchword "doe".
Here's a list of all attributes:
**M:** phoneCell **P:** phoneHome **p:** phoneWork **E:** emailHome **e:** emailWork **A:** addressHome **a:** addressWork **O:** Organisation **B:** Birthday **T:** Title **n:** Note
This creates a contact for John Doe with a private mobile phone number and an email address in address book 1:
qcard -a 1 -n "John Doe M:+49 172 123123 E:email@example.com"
Just combine the parameters from above like you wish.
This shows searches for "doe" in addressbook 2 and prints the corresponding filenames ("fobarxyz.vcf"):
qcal -a 2 -s doe -f
This edits the selected vCard object in your $EDITOR (i.e. vim). When you save-quit the modified object is automatically uploaded:
qcal -c 2 -edit foobarxyz.vcf