Command reference

oko-cli calendar sync

Syncs every connected account (or one) over a bounded window into the device-local events mirror.

Invocation

oko-cli calendar sync [--days-past N] [--days-ahead N] [--account ID]

Inputs and options

  • --days-past defaults to 7 and --days-ahead to 60.
  • --account narrows the sync to one connected account.

Output and state effect

  • Fetches each account's window — Google and Microsoft expand recurrences server-side, CalDAV/ICS carry the raw RRULE — and replaces that account's slice of ~/.oko/calendar/events.json, so cancelled events disappear.
  • A failing account never aborts the others; its error rides in the summary and the run exits unsuccessfully.
  • On Wisent machines holding operating-store credentials the records also mirror into the team's calendar_events table; OKO_CALENDAR_NO_MIRROR=1 keeps a run device-local, and installations without those credentials skip the mirror silently.

Refusals and safe exits

  • With no connected accounts it refuses: no calendar accounts are connected; run 'oko-cli calendar connect {eventkit|google|microsoft|caldav|ics} ...' first.
  • A non-ICS payload, refused credentials (HTTP 401), and an unreachable server each fail with their exact sentence naming the URL.