← KettlewiseAll help

Calendar module

Reads your calendar events into the local cache, one of two ways. Neither can write: both connectors only make GET requests (scripts/check_boundaries.sh fails CI on anything else).

Private iCal link (default)Google's Calendar API (advanced)
Setuppaste a link, ~2 minutesa Google Cloud project, ~15 minutes once
Works withGoogle, iCloud, Outlook, Fastmail, any .ics linkGoogle only
FreshnessGoogle refreshes these links slowly: changes can take hourswithin a sync
Attendeesnames, but not which one is younames, without you
Which calendarsone link eachevery calendar selected in Google Calendar

If an iCal link is stored, it's used; otherwise the API. Both make the same documents, so the panels, the brief and answers don't change. Switching from the API to iCal replaces the cached events on the next sync.

iCal setup (~2 minutes)

  1. Copy the link. Google Calendar on the web: ⚙ Settings → your calendar → Integrate calendar → Secret address in iCal format. iCloud: share the calendar as a Public Calendar and copy the webcal:// link. Outlook: Settings → Calendar → Shared calendars → Publish a calendar → the ICS link.
  2. Store it: paste it on the Modules screen, or run kettlewise calendar ical in your own terminal (the prompt hides what you paste). Several calendars: paste each link, separated by spaces. Kettlewise reads every link once to check it, then keeps them in the Keychain.

The link is the credential: anyone holding it can read that calendar. It never appears in an error, a log or a document id (events are named by a hash of it). To make a link useless, press Reset beside it in Google Calendar's settings, then store the new one.

Each sync reads every link whole and expands repeating events in code (recurring-ical-events: repeat rules, skipped and moved occurrences), from KETTLEWISE_CALENDAR_HISTORY_DAYS back to 90 days ahead. An event gone from the feed leaves the cache. One link failing fails the whole sync, so a calendar is never half-dropped.

Comparing the two routes

Already on the API? kettlewise calendar compare reads the next 14 days both ways (asking for the link if it isn't stored, and storing nothing) and lists events only one route has, and ones whose end, place, all-day or busy flag differ. Expect a lag for changes made in the last few hours; anything else is worth a look.

Advanced: Google's Calendar API (once, ~15 minutes)

You create a small Google Cloud project that only you use. The same project is reused for Gmail later, so this is the only time you do it.

  1. Project. Open https://console.cloud.google.com/, project picker → New project, name it kettlewise, create, and make sure it's selected.
  2. Enable the API. APIs & Services → Library, search Google Calendar API, Enable.
  3. Consent screen. APIs & Services → OAuth consent screen (may be labeled Google Auth Platform). Get started:

    • App name Kettlewise, your email as support and developer contact.
    • Audience: External.
    • Save.
  4. Scope. Under Data access, Add or remove scopes, filter for calendar.readonly, tick .../auth/calendar.readonly (See and download any calendar you can access). Only that one. Save.
  5. Branding. Publishing (next step) requires an app name, support email, homepage URL and privacy policy URL on the Branding page. They must be real pages; nothing is reviewed. A short privacy page saying what Kettlewise does is enough: read-only calendar access, data stored only on your machine, never shared or sent to a cloud model, revoke at myaccount.google.com/permissions. If the pages are on a domain you own, add it under Authorized domains (Google may ask you to verify ownership via Search Console).
  6. Publish to production. Under Audience, publishing status → Publish app → confirm. This step matters: in Testing, Google expires refresh tokens after 7 days and sync silently breaks every week. You don't need to submit for verification; it's for you alone. Publish before step 8: a login made while the app is in Testing keeps the 7-day expiry even after publishing.
  7. Client. Clients (or Credentials → Create credentials → OAuth client ID):

    • Application type: Desktop app, name kettlewise-cli.
    • Leave "This client will be used by an AI-powered agent" unchecked. That's for agents that act on a user's behalf; Kettlewise's model never sees this login and can't act.
    • Create, then Download JSON.
  8. Run:

    kettlewise calendar auth ~/Downloads/client_secret_….json

    Kettlewise stores the client in the macOS Keychain, then opens your browser. Google shows "Google hasn't verified this app": click Advanced → Go to Kettlewise (unsafe). That warning is expected for a personal, unverified app. Approve read-only calendar access; the browser says you can close it.

  1. Delete the downloaded JSON. It's in the Keychain now: rm ~/Downloads/client_secret_*.json

Then kettlewise sync calendar.

What's stored where

WhatWhere
iCal linksKeychain: kettlewise / calendar-ical
OAuth client (id + secret from the JSON)Keychain: kettlewise / google-client
Refresh token (calendar.readonly only)Keychain: kettlewise / calendar-refresh-token
Events~/kettlewise/data/kettlewise.db

What's synced (API)

Every calendar you've selected in Google Calendar (or KETTLEWISE_CALENDAR_IDS), events from KETTLEWISE_CALENDAR_HISTORY_DAYS ago (default 365) on the first sync, then each sync re-reads a window from 7 days back to 90 days ahead, so moved and cancelled events are picked up. Recurring events are expanded into their individual occurrences by Google.

Removing access

kettlewise calendar forget (or disconnect on the Modules screen) removes the iCal links and the Google sign-in from the Keychain. Then, on the services' side: Reset the iCal link in Google Calendar's settings, and remove Kettlewise at https://myaccount.google.com/permissions.