Skip to content

Providers ​

--provider selects the adapter: fake (default) or google. Both sit behind the same CalendarProvider port; the planner checks each provider's declared capabilities at plan time and emits warnings or errors for unsupported desired states.

fake ​

A file-backed fake for tests, demos, and development — test/demo only. Serialises its whole backend to .cicada/fake-provider.json after every mutation, so separate cicada invocations share one "provider" and hand-edits simulate out-of-band changes. Reports permissive capabilities (everything supported).

google ​

Google Calendar API v3, with Google Meet as its conferencing kind — conferencing: meet is an intent the planner resolves, not a URL.

Capabilities ​

CapabilityValue
maxAttendees200
maxReminders5
reminderKindspopup, email
Recurrence frequenciesall seven (DAILY…SECONDLY)
Ordinal byDay, byMonthDay, byMonth, raw RRULEyes
conferencingKindsmeet
can_suppress_notificationsyes (sendUpdates)
supports_free_busyyes
supports_taggingyes (extendedProperties.private)
supports_conditional_writesyes (etag → If-Match)

Retried with exponential backoff at the HTTP layer; 429/5xx surface as Transient errors.

Auth ​

Credentials resolve in this order (first match wins):

PrioritySourceVariables
1Service-account key file pathCICADA_GOOGLE_SERVICE_ACCOUNT_JSON or GOOGLE_APPLICATION_CREDENTIALS
2Static access token (no refresh; ~1h expiry)CICADA_GOOGLE_ACCESS_TOKEN
3OAuth installed-app client + refresh tokenCICADA_GOOGLE_CLIENT_ID + CICADA_GOOGLE_CLIENT_SECRET; refresh from CICADA_GOOGLE_REFRESH_TOKEN or the stored token
4Persisted service-account keygoogle/service-account in the secrets store (written by cicada provider add google --service-account)

Optional:

VariableMeaning
CICADA_GOOGLE_SUBJECTDomain-wide delegation sub for service-account JWT
CICADA_GOOGLE_TOKEN_URLToken endpoint override (tests)
CICADA_SECRETS_DIRSecrets directory override

cicada provider add google ​

  • OAuth (no flag): needs a client id/secret (flags or env). Prints the consent URL (calendar scope, offline access); a loopback listener captures the code, or the code/redirect URL is pasted. The refresh token is stored at google/refresh-token in the secrets store.
  • --service-account key.json: validates and persists the key at google/service-account — the priority-4 fallback above. Share the target calendar with the account's client_email.

Secrets live at $CICADA_SECRETS_DIR, else $XDG_STATE_HOME/cicada/secrets, else ~/.local/state/cicada/secrets — directory 0700, files 0600, key names URL-encoded (google%2Frefresh-token).

Binding ​

metadata.calendarId in YAML wins, then the recorded binding in state, then primary. cicada reconciles existing remote calendars — it does not provision them.

Future providers ​

Teams, CalDAV and others arrive via the same CalendarProvider port (list/get/create/update/delete, findByTag, freeBusy, capabilities) — adapters, not core changes.