Files
aris/packages/aelis-source-caldav
kenneth 1129d52906 feat(caldav): add FeedItemRenderer
Implement renderCalDavFeedItem using JRX JSX to render
CalDAV events as FeedCard components. Bump @nym.sh/jrx
to 0.2.0 for null/undefined child support.

Co-authored-by: Ona <no-reply@ona.com>
2026-03-15 00:02:34 +00:00
..
2026-03-15 00:02:34 +00:00
2026-03-10 19:19:23 +00:00

@aelis/source-caldav

A FeedSource that fetches calendar events from any CalDAV server.

Usage

import { CalDavSource } from "@aelis/source-caldav"

// Basic auth (Nextcloud, Radicale, Baikal, iCloud, etc.)
const source = new CalDavSource({
	serverUrl: "https://caldav.example.com",
	authMethod: "basic",
	username: "user",
	password: "pass",
	lookAheadDays: 7, // optional, default: 0 (today only)
	timeZone: "America/New_York", // optional, default: UTC
})

// OAuth
const source = new CalDavSource({
	serverUrl: "https://caldav.provider.com",
	authMethod: "oauth",
	accessToken: "...",
	refreshToken: "...",
	tokenUrl: "https://provider.com/oauth/token",
})

iCloud

Use your Apple ID email as the username and an app-specific password:

const source = new CalDavSource({
	serverUrl: "https://caldav.icloud.com",
	authMethod: "basic",
	username: "you@icloud.com",
	password: "<app-specific-password>",
})

Testing

bun test

Live test

bun run test:live connects to a real CalDAV server and prints all events to the console. It prompts for:

  • CalDAV server URL — e.g. https://caldav.icloud.com
  • Username — your account email
  • Password — your password (or app-specific password for iCloud)
  • Look-ahead days — how many days beyond today to fetch (default: 0)

The script runs both fetchContext and fetchItems, printing the calendar context (in-progress events, next event, today's count) followed by each event with its title, time, location, signals, and attendees.