Sync Any CalDAV Calendar with the Caldav-Calendar Skill: iCloud, Google, Fastmail & More
Your AI agent can read your email, search the web, and manage your files—but what about your calendar? If you're using CalDAV-compatible calendars (iCloud, Google, Fastmail, Nextcloud, or any self-hosted solution), the caldav-calendar skill gives your agent full access to view, search, create, and edit events.
The Problem
Most calendar integrations require complex OAuth flows or proprietary APIs. If you're running Clawdbot on Linux and want a lightweight, universal solution that works with any CalDAV provider, you need something different. That's where vdirsyncer + khal come in—a battle-tested combo that syncs calendars to local .ics files and provides a powerful CLI for managing them.
Installation
clawdhub install caldav-calendarYou'll also need the underlying tools:
# Debian/Ubuntu
sudo apt install vdirsyncer khal
# Arch
pacman -S vdirsyncer khal
# Fedora
sudo dnf install vdirsyncer khalConfiguration
Step 1: Configure vdirsyncer
Create ~/.config/vdirsyncer/config:
[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
google_calendarstorage type - Fastmail:
https://caldav.fastmail.com/dav/calendars/user/EMAIL/ - Nextcloud:
https://YOUR.CLOUD/remote.php/dav/calendars/USERNAME/
Step 2: Configure khal
Create ~/.config/khal/config:
[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-%dStep 3: Initial sync
vdirsyncer discover # First time only
vdirsyncer syncUsage Examples
View upcoming events
khal list # Today
khal list today 7d # Next 7 days
khal list -a Work today # Specific calendarSearch for events
khal search "meeting"
khal search "dentist" --format "{start-date} {title}"Create new events
khal new 2026-01-15 10:00 11:00 "Team standup"
khal new tomorrow 14:00 15:30 "Call" -a Work
khal new 2026-01-15 "All day event"
vdirsyncer sync # Push changes to serverEdit events interactively
khal edit "standup"
# Press: s=summary, d=description, t=datetime, D=delete, q=quit
vdirsyncer syncPro Tips
- Always sync before and after changes —
vdirsyncer syncis your friend - Use output formats for scripting:
khal list --format "{start-date} {start-time} {title}" today 7d - Clear stale cache if data looks wrong:
rm ~/.local/share/khal/khal.db - Store passwords securely — use a password manager command or keyring integration
Why This Matters
With caldav-calendar installed, your agent can:
- Check your schedule before booking meetings
- Create reminders and events on your behalf
- Search past events for context
- Work with any CalDAV provider—no vendor lock-in
The skill has 64 stars and nearly 7k installs for good reason: it's a rock-solid, privacy-respecting way to give your agent calendar superpowers.
Links:
Comments (0)
No comments yet. Be the first to comment!