Command reference
oko calendar add
Creates one event on a writable account: EventKit, Google, Microsoft, or CalDAV.
Invocation#
oko calendar add --account ID --title T --starts ISO (--ends ISO | --all-day [--ends ISO]) [--location L] [--notes N] [--uid UID]Inputs and options#
- --account names the connected account and --title with --starts (ISO-8601) are required; a timed event also needs --ends, since no length is right for every event, and an --all-day event without --ends lasts its day (RFC 5545).
- --uid pins the CalDAV resource name and the Google event id, which makes creation idempotent and duplicates detectable.
Output and state effect#
- Creates the event on the provider — an .ics resource PUT with If-None-Match for CalDAV, an API insert for Google and Microsoft, a saved EKEvent for EventKit — then mirrors the provider's answer into the local events file immediately; the next sync reconciles.
Refusals and safe exits#
- An ICS account refuses: account '…' is an ICS subscription, which is read-only; events cannot be added, edited, or removed.
- A duplicate uid on CalDAV refuses: an event with uid '…' already exists on account '…'.
- A timed event without --ends refuses: calendar add requires --ends for a timed event; an --all-day event without one lasts its day.
- An end at or before the start refuses, as iCalendar (RFC 5545) requires: calendar add: the event ends at <ends>, not after it starts at <starts>; state an end later than the start. Oko Desktop's add form sends the end the person picked, unchanged, and shows this refusal.
- An unknown account, an unparseable --starts/--ends, and the ungrated EventKit consent each refuse with their exact sentence.