caldr is a super lightweight command line calendar that supports iCal
synchronization via CalDAV, output templating using
text/template, as well
as JSON output.
caldr, the command line calendar. It’s super lightweight, yet it
supports CardDAV sync!
go build .
Either export all necessary variables to your ENV or set them as command line flags:
export CARDDAV_USERNAME='...' export CARDDAV_PASSWORD='...' export CARDDAV_ENDPOINT='...' export CALDR_DB='...'
If you’re using Baïkal for example, you
would export something like this as
CALDR_DB is the local events database in order to not need to contact
the CalDAV for every lookup. You might set it to something like this:
caldr is launched for the first time, it requires the
-r flag to
refresh the events and sync them locally:
This way you could create a cron job that refreshes
caldr in the background,
e.g. every three hours:
0 */3 * * * sh -c 'caldr -r'
You can also output contacts as JSON format using the
Find more flags and info with
You can customize the regular output using templating. The template can either
be passed using the
--template <file> flag or by exporting
in the in the environment.
The templating format is the Go standard
Available property names that are available can be found by checking the
CalEvent struct in
An example template can be found here. To make use of the template, you can
copy it to e.g.
~/.config/caldr.tmpl and have
CALDR_TEMPLATE=~/.config/caldr.tmpl exported in your
- Q: Does
caldrwrite/modify any contact information? A: Nope, so far it’s read-only and does not support updating iCals, hence it won’t mess with your data.
- Q: Can I use it with my local calendar?
A: Nope, as of right now
caldronly supports CalDAV servers to sync with.
- Q: Does it support HTTP Digest auth? A: Nope, only HTTP Basic auth.
- Q: The
text/templatestuff doesn’t work for me, can I make
caldroutput contact data differently? A: Yes, you can use the
-jflag and have it output pure JSON, which you can then process using e.g.
published [ ] · updated [ ]