Add event/calendar CRUD operations and recurrence support#1
Add event/calendar CRUD operations and recurrence support#1jorgemitchell0808 wants to merge 3 commits intoschappim:mainfrom
Conversation
jorgemitchell0808
commented
Feb 8, 2026
- Add update event command with all event fields (single events only)
- Add calendar create/update/delete commands
- Add recurrence rules (daily/weekly/monthly with advanced options)
- Add travel time, alarms, URL, and availability fields
- Add geocoding for structured location resolution
- Restructure README with clear hierarchy and command reference
- Bump version to 1.3.0
…nt, and improve README
schappim
left a comment
There was a problem hiding this comment.
Hey Jorge, thanks for taking the time to put this together — this is a really solid first contribution and I appreciate the ambition here. Calendar CRUD, recurrence rules, geocoding, travel time — you've clearly thought about what would make ekctl more useful. The overall structure and approach is great.
I've gone through the diff in detail and have some feedback before we can get this merged. Nothing insurmountable — mostly cleanup and a couple of bugs.
Bugs to fix
Duplicate travel time setting in updateEvent()
The travel time is being set twice with event.setValue(tTime, forKey: "travelTime") — looks like a copy-paste leftover. Just remove the duplicate block.
Alarms sign issue
The --alarms flag description says "minutes relative to start", but the code does $0 * -60. If a user passes 10,60 (meaning 10 and 60 minutes before), that works. But if they pass -30 (thinking negative = before), the double negation produces a positive offset — meaning 30 minutes after the event. Either enforce positive-only input and document it clearly, or handle the sign more carefully.
Silent failure in UpdateEvent
When date parsing fails in UpdateEvent, it throws ExitCode.failure without printing a JSON error message. Every other command prints a proper JSONOutput.error(...) before throwing — this one should too, so callers can programmatically understand what went wrong.
Code quality
Inconsistent geocoding
addEvent uses the shared resolveLocation() helper (5s timeout), but updateEvent has its own inline geocoding with a 2s timeout and slightly different logic. Let's use resolveLocation() in both places to keep things consistent.
Private API for travel time
event.setValue(tTime, forKey: "travelTime") is using KVC on a private property — it works today but could break with future macOS updates. Worth adding a comment acknowledging this, so future maintainers know it's intentional.
Dead parameters
travelStartLocation and transportType exist in the updateEvent and addEvent function signatures but aren't wired up to any CLI flags or used anywhere. Let's remove them for now — we can add them properly when they're ready.
Truncated MARK comment
Line has // MARK: - C — should be // MARK: - Calendar Commands or similar.
Priority type change
Changing AddReminder.priority from Int? to String? is a subtle breaking change. The fallback silently defaults invalid strings to 0 instead of reporting an error. If someone had a script passing --priority high, it would silently become "no priority" instead of failing.
README
The restructuring looks cleaner overall, but I'd like to keep some content that was removed:
- The date format reference table — users reference that a lot
- The scripting examples section (get calendar by name, list today's events, export to CSV) — that's some of the most practical documentation we have
- The
alias listJSON output example
Also, missing newline at end of file.
Nice to have (not blocking)
- Tests for the new commands would be great, even basic ones
- An
update remindercommand would round out the CRUD symmetry, but fine to add in a follow-up
Really appreciate you tackling this — the feature set is exactly what I've been wanting to add. Once these issues are addressed, I'm keen to get this merged. Let me know if any of the feedback is unclear or if you want to discuss a different approach for any of it.
…ixed bugs, cleaned up code.
|
Hey Marcus, thanks for the detailed review, really really helpful feedback :) I've pushed a new commit addressing everything: Bugs fixed
Code quality
README
Nice to haves
Let me know if anything needs a second look! |