Skip to content

tsdav Documentation

Lightweight, RFC-compliant TypeScript client with zero Node-only dependencies. Runs seamlessly in Node.js, Browsers, Cloudflare Workers, Bun, and Deno.
✨tsdav v2.3.5 is live • Zero Node-only globals • Universal Portable Client

Quick Start Guides

Get started quickly with comprehensive guides and API references:

Quick Start

Learn how to install, configure authentication (Basic, OAuth), and initialize your first DAV client in less than 60 seconds.


Get Started →

CalDAV APIs

Discover calendar collections, query events by time range, handle recurring events, and manage attendees.


Explore CalDAV →

CardDAV APIs

Connect to remote address books, retrieve and parse vCards, and perform atomic contact updates.


Explore CardDAV →

Smart Calendar Sync

Production-ready architectural guide for bi-directional remote-to-local sync with CTAGs and delta tokens.


Read Sync Guide →

Cloud Providers

Setup instructions and quirk workarounds for Apple iCloud, Google Calendar, Fastmail, Nextcloud, and Zoho.


View Providers →

Interactive Converter

Real-time playground to convert and inspect WebDAV XML request bodies and normalized response structures.


Open Playground →


Quick Installation

Install tsdav using your preferred package manager:

Terminal window
pnpm add tsdav

30-Second Example

Connecting to Apple iCloud CalDAV:

example.ts
import { createDAVClient } from 'tsdav';
const client = await createDAVClient({
serverUrl: 'https://caldav.icloud.com',
credentials: {
username: 'YOUR_APPLE_ID',
password: 'YOUR_APP_SPECIFIC_PASSWORD',
},
authMethod: 'Basic',
defaultAccountType: 'caldav',
});
// Discover all remote calendars
const calendars = await client.fetchCalendars();
console.log(`Found ${calendars.length} calendars:`, calendars.map((c) => c.displayName));
// Fetch all calendar events
const events = await client.fetchCalendarObjects({
calendar: calendars[0],
});
console.log(`Fetched ${events.length} calendar events.`);

Key Features

Universal Portability

Designed with zero Node-only globals (fs, net, stream). Works out of the box in browsers, Node.js, Cloudflare Workers, Electron, Bun, and Deno.

Delta Sync & CTAGs

Native support for RFC 6578 sync-collection reports and WebDAV getctag headers for instant, low-bandwidth delta updates.

Real Provider Quirks Handled

Pre-configured normalization routines for Google’s UID renames, Apple’s custom namespaces, and Nextcloud’s deletion quirks.

AI-Ready Documentation

Provides structured /llms.txt and plain-text feeds optimized for ingestion by Cursor, Claude, and custom LLM workflows.