← /projects

calendar-mirror

One-way calendar mirror that publishes your personal busy time to a work calendar without leaking any event details.

The Problem

Part-time and multi-org work means colleagues need to book around your personal calendar, but most calendar sharing is all-or-nothing: to let them see when you're busy, you also hand over what you're busy with. There's no clean way to publish "I'm unavailable then" without exposing the personal events behind it.

What I Built

A zero-dependency Python reconciler (stdlib only) driving Google's official gws Workspace CLI, scheduled by a macOS launchd LaunchAgent (every 60s by default). An intermediary Google account holds free/busy-only access to the personal calendar; each run reads merged busy ranges via freebusy.query over a rolling 30-day window and reconciles a set of generic "Personal" block events on the intermediary's own calendar, each inviting the work calendar (which auto-adds invitations). The design is declarative: every run makes the mirror's set of busy intervals equal the source's, so create = source − mirror and delete = mirror − source, with no change-detection. A native Swift/AppKit menu-bar app reads a heartbeat file and shows green/yellow/red sync health at a glance.

Notable

State lives entirely in the calendar itself, which makes the job idempotent and crash-safe — a moved meeting is just delete-old plus create-new, and every write uses sendUpdates=none so no notification emails ever fire. The script only ever touches events carrying both the configured title and an invisible private tag, and it does nothing on a failed or empty read, so a momentary API hiccup can't wipe your blocks. The free/busy boundary is enforced by Google's calendar share, not by the script — it is structurally incapable of reading your event details.

Stack

Python (stdlib only)Google Workspace CLI (gws)Google Calendar APIlaunchdSwift / AppKitmacOS

Status

Open source at github.com/blaizew/calendar-mirror.