Manage calendar events and todos via CalDAV protocol. Supports Google Calendar, iCloud, Nextcloud, Fastmail, NetEase (163/126/yeah.net), and any standard CalDAV server.
Run the setup script to install dependencies and configure your CalDAV account:
bash
bash setup.sh
If running commands manually without setup.sh, install dependencies first:
bash
npm install --production
Configuration is stored at ~/.config/mail-skills/.env (shared with imap-smtp-email skill). If no shared config is found, the skill falls back to a .env file in the skill directory.
bash
# Default account
PROVIDER=163
USERNAME=your@163.com
PASSWORD=your_password
CALDAV_DEFAULT_CALENDAR=
The PROVIDER preset auto-fills the CalDAV server URL. For custom servers:
bash
PROVIDER=custom
USERNAME=your@email.com
PASSWORD=your_password
CALDAV_SERVER_URL=https://your-caldav-server.com/
You can configure additional accounts in the same config file. Each account uses a name prefix (uppercase) on all variables.
bash
# Work account (WORK_ prefix)
WORK_PROVIDER=gmail
WORK_USERNAME=me@company.com
WORK_PASSWORD=app_password
WORK_CALDAV_DEFAULT_CALENDAR=work
Add --account <name> before the command:
bash
node scripts/caldav.js --account work list-calendars
node scripts/caldav.js --account work list-events --start 2026-01-01 --end 2026-12-31
ProviderServer URLAuthGoogle Calendarhttps://calendar.google.com/calendar/dav/App PasswordiCloudhttps://caldav.icloud.com/App-Specific PasswordNextcloudhttps://<host>/remote.php/dav/calendars/<user>/Username/PasswordFastmailhttps://caldav.fastmail.com/dav/Username/PasswordNetEase (163/126/yeah.net)https://caldav.163.com/Authorization CodeNetEase Enterprise (North)https://caldav.qiye.163.com/Username/PasswordNetEase Enterprise (East)https://caldavhz.qiye.163.com/Username/Password
List all available calendars.
bash
node scripts/caldav.js [--account <name>] list-calendars
Query events in a time range.
bash
node scripts/caldav.js [--account <name>] list-events --start <date> --end <date> [--calendar <id>] [--force-refresh]
Get a specific event by UID.
bash
node scripts/caldav.js [--account <name>] get-event --uid <uid> [--calendar <id>]
Create a new calendar event.
bash
node scripts/caldav.js [--account <name>] create-event --summary <text> --start <datetime> --end <datetime> \
[--description <text>] [--location <text>] [--calendar <id>]
Update an existing event.
bash
node scripts/caldav.js [--account <name>] update-event --uid <uid> [--summary <text>] [--start <datetime>] \
[--end <datetime>] [--description <text>] [--location <text>] [--calendar <id>]
Delete an event.
bash
node scripts/caldav.js [--account <name>] delete-event --uid <uid> [--calendar <id>]
List all todos/tasks.
bash
node scripts/caldav.js [--account <name>] list-todos [--status <all|pending|completed>] [--calendar <id>] [--force-refresh]
Create a new todo/task.
bash
node scripts/caldav.js [--account <name>] create-todo --summary <text> [--due <date>] \
[--description <text>] [--priority <1-9>] [--calendar <id>]
Update an existing todo.
bash
node scripts/caldav.js [--account <name>] update-todo --uid <uid> [--summary <text>] [--due <date>] \
[--status <pending|completed>] [--calendar <id>]
Delete a todo.
bash
node scripts/caldav.js [--account <name>] delete-todo --uid <uid> [--calendar <id>]
Query free/busy information for a time range.
bash
node scripts/caldav.js [--account <name>] freebusy --start <datetime> --end <datetime> [--calendar <id>]
List all configured CalDAV accounts.
bash
node scripts/caldav.js list-accounts
list-events and list-todos automatically use incremental sync when available:
Sync state is cached at ~/.config/mail-skills/caldav-cache/ per account and calendar. Write operations (create/update/delete) automatically invalidate the cache.
Use --force-refresh to bypass the cache and force a full sync:
bash
node scripts/caldav.js list-events --start 2026-01-01 --end 2026-12-31 --force-refresh
node scripts/caldav.js list-todos --force-refresh
~/.config/mail-skills/.env with 600 permissions (owner read/write only)Connection failed:
Authentication failed:
No calendars found:
imap-smtp-email - Read, search, manage, and send emails via IMAP/SMTP. Supports Gmail, Outlook, NetEase (163/126/188), and any standard IMAP/SMTP server. Install with: bash
npx skills add https://github.com/gzlicanyi/mail-skills -s imap-smtp-email
Issues and pull requests are welcome at github.com/gzlicanyi/mail-skills.