caldav-calendar
Original:🇺🇸 English
Translated
Sync and query CalDAV calendars (iCloud, Google, Fastmail, Nextcloud, etc.) using vdirsyncer + khal. Works on Linux.
4installs
Added on
NPX Install
npx skill4agent add sundial-org/awesome-openclaw-skills caldav-calendarTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →CalDAV Calendar (vdirsyncer + khal)
vdirsyncer syncs CalDAV calendars to local files. khal reads and writes them.
.icsSync First
Always sync before querying or after making changes:
bash
vdirsyncer syncView Events
bash
khal list # Today
khal list today 7d # Next 7 days
khal list tomorrow # Tomorrow
khal list 2026-01-15 2026-01-20 # Date range
khal list -a Work today # Specific calendarSearch
bash
khal search "meeting"
khal search "dentist" --format "{start-date} {title}"Create Events
bash
khal new 2026-01-15 10:00 11:00 "Meeting title"
khal new 2026-01-15 "All day event"
khal new tomorrow 14:00 15:30 "Call" -a Work
khal new 2026-01-15 10:00 11:00 "With notes" :: Description goes hereAfter creating, sync to push changes:
bash
vdirsyncer syncEdit Events (interactive)
khal editbash
khal edit "search term"
khal edit -a CalendarName "search term"
khal edit --show-past "old event"Menu options:
- → edit summary
s - → edit description
d - → edit datetime range
t - → edit location
l - → delete event
D - → skip (save changes, next match)
n - → quit
q
After editing, sync:
bash
vdirsyncer syncDelete Events
Use , then press to delete.
khal editDOutput Formats
For scripting:
bash
khal list --format "{start-date} {start-time}-{end-time} {title}" today 7d
khal list --format "{uid} | {title} | {calendar}" todayPlaceholders: , , , , , , , , , ,
{title}{description}{start}{end}{start-date}{start-time}{end-date}{end-time}{location}{calendar}{uid}Caching
khal caches events in . If data looks stale after syncing:
~/.local/share/khal/khal.dbbash
rm ~/.local/share/khal/khal.dbInitial Setup
1. Configure vdirsyncer (~/.config/vdirsyncer/config
)
~/.config/vdirsyncer/configExample for iCloud:
ini
[general]
status_path = "~/.local/share/vdirsyncer/status/"
[pair icloud_calendar]
a = "icloud_remote"
b = "icloud_local"
collections = ["from a", "from b"]
conflict_resolution = "a wins"
[storage icloud_remote]
type = "caldav"
url = "https://caldav.icloud.com/"
username = "your@icloud.com"
password.fetch = ["command", "cat", "~/.config/vdirsyncer/icloud_password"]
[storage icloud_local]
type = "filesystem"
path = "~/.local/share/vdirsyncer/calendars/"
fileext = ".ics"Provider URLs:
- iCloud:
https://caldav.icloud.com/ - Google: Use storage type
google_calendar - Fastmail:
https://caldav.fastmail.com/dav/calendars/user/EMAIL/ - Nextcloud:
https://YOUR.CLOUD/remote.php/dav/calendars/USERNAME/
2. Configure khal (~/.config/khal/config
)
~/.config/khal/configini
[calendars]
[[my_calendars]]
path = ~/.local/share/vdirsyncer/calendars/*
type = discover
[default]
default_calendar = Home
highlight_event_days = True
[locale]
timeformat = %H:%M
dateformat = %Y-%m-%d3. Discover and sync
bash
vdirsyncer discover # First time only
vdirsyncer sync