Bring in list IDs and delete-completed-item support from upstream - #7
Merged
Merged
Conversation
…te/edit setComplete and edit now resolve their reminder argument by numeric index or by calendarItemExternalIdentifier, and gain --format to print the updated reminder as JSON. Also removes a leftover debug print left in setComplete. Cherry-picked from keith#90, commit db382c9 ("now can complete with IDs").
Renames the remaining listName/index arguments to listNameOrId/indexOrId across Show, Add, Edit and Delete, dropping an unused duplicate add() method left over from an earlier merge. No changes on top of this branch: the renames were already applied while resolving conflicts on the preceding cherry-picks, including preserving this fork's own existing fix for deleting completed reminders by external id, and the delete command's list argument now resolves by name or id via the same calendar(withNameOrId:) helper. Cherry-picked from keith#90, commit 9c05a67 ("adding ids to lists").
Upstream, this commit rebases cromulus' list-id work onto a newer base of reminders-cli so it applies again. In this fork the equivalent state was already reached while adapting the earlier commits in this series, so there is nothing further to apply here; kept as an empty commit to credit the rebase. Cherry-picked from keith#103, commit 45e653f ("updated patch: making the UUID a first-class citizen").
Upstream, this commit adds --id/--index flags to delete so a completed reminder can be deleted by its external identifier. This fork already fixed the same underlying problem independently, with a smaller change that keeps the delete command's existing positional index-or-id argument and auto-detects whether it is numeric (index, scoped to incomplete items like show) or an external id (scoped to all items, completed included). That existing fix is kept as-is; this commit intentionally applies no changes and is kept empty to credit the upstream fix for the same issue.
Cherry-picked from keith/reminders-cli pull request 103 ("Allow to delete completed items").
Extract the list-name-or-id matching logic out of Reminders.calendar(withNameOrId:) into a free function, and expose getReminder(from:atIndexOrId:) internally, so both can be exercised directly via @testable import without needing live access to Reminders.app, following the precedent already set by matchesAdditionalFilters. Add IdentifierTests.swift covering: EKCalendar/EKReminder JSON encoding of calendarIdentifier/listId, list resolution by id/title with id taking precedence on a collision, and reminder resolution by index vs. external id, including not-found cases.
Show that show-lists now prints each list's calendarIdentifier alongside its title, that any list name argument also accepts an id, that complete/uncomplete/ edit support --format json, and how to delete an already-completed reminder by its id.
udondan
added a commit
that referenced
this pull request
Sep 13, 2026
…am (#7) * feat: output unique list identifiers via show-lists Adds calendarIdentifier alongside each list's title in 'show-lists' output (both plain and JSON), so lists can be referenced by a stable ID. Cherry-picked from keith#90, commit 1778d75c ("now we are outputting unique ids for lists"). * feat: include list id in show-all JSON output Adds listId (the reminder's list's calendarIdentifier) to the JSON encoding of each reminder. Cherry-picked from keith#90, commit e1354ad6 ("showing list id in show-all"). * feat: accept a list id in place of a list name for add addReminder's list argument now resolves either a list name or its calendarIdentifier. Cherry-picked from keith#90, commit cf72df2b ("can create reminders using uuids"). * feat: accept a reminder id in place of an index for complete/uncomplete/edit setComplete and edit now resolve their reminder argument by numeric index or by calendarItemExternalIdentifier, and gain --format to print the updated reminder as JSON. Also removes a leftover debug print left in setComplete. Cherry-picked from keith#90, commit 2a87ecff ("now can complete with IDs"). * feat: finish threading list ids through show/add/edit/delete Renames the remaining listName/index arguments to listNameOrId/indexOrId across Show, Add, Edit and Delete, dropping an unused duplicate add() method left over from an earlier merge. No changes on top of this branch: the renames were already applied while resolving conflicts on the preceding cherry-picks, including preserving this fork's own existing fix for deleting completed reminders by external id, and the delete command's list argument now resolves by name or id via the same calendar(withNameOrId:) helper. Cherry-picked from keith#90, commit 806e773d ("adding ids to lists"). * chore: rebase the list-id patch (no changes needed in this fork) Upstream, this commit rebases cromulus' list-id work onto a newer base of reminders-cli so it applies again. In this fork the equivalent state was already reached while adapting the earlier commits in this series, so there is nothing further to apply here; kept as an empty commit to credit the rebase. Cherry-picked from keith#103, commit 4c8bbb1f ("updated patch: making the UUID a first-class citizen"). * chore: acknowledge the upstream fix for deleting completed items Upstream, this commit adds --id/--index flags to delete so a completed reminder can be deleted by its external identifier. This fork already fixed the same underlying problem independently, with a smaller change that keeps the delete command's existing positional index-or-id argument and auto-detects whether it is numeric (index, scoped to incomplete items like show) or an external id (scoped to all items, completed included). That existing fix is kept as-is; this commit intentionally applies no changes and is kept empty to credit the upstream fix for the same issue. Cherry-picked from keith/reminders-cli pull request 103 ("Allow to delete completed items"). * test: cover list/reminder id resolution and list id encoding Extract the list-name-or-id matching logic out of Reminders.calendar(withNameOrId:) into a free function, and expose getReminder(from:atIndexOrId:) internally, so both can be exercised directly via @testable import without needing live access to Reminders.app, following the precedent already set by matchesAdditionalFilters. Add IdentifierTests.swift covering: EKCalendar/EKReminder JSON encoding of calendarIdentifier/listId, list resolution by id/title with id taking precedence on a collision, and reminder resolution by index vs. external id, including not-found cases. * docs: document list ids and per-command json format flags Show that show-lists now prints each list's calendarIdentifier alongside its title, that any list name argument also accepts an id, that complete/uncomplete/ edit support --format json, and how to delete an already-completed reminder by its id. --------- Co-authored-by: Bill Cromie <bill.cromie@gmail.com> Co-authored-by: Gunnar Wrobel <post@gunnarwrobel.de>
This was referenced Sep 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings in two related upstream features from
keith/reminders-cli, cherry-pickedfrom PR keith#90 (cromulus) and PR keith#103 (wrobel) to preserve original authorship,
adapted to this fork's current codebase:
show-listsnow prints each list'scalendarIdentifieralongside its title(
name (id)in plain mode,calendarIdentifier/titlefields in JSON), andevery command that takes a list argument (
show,show-all,add,complete,uncomplete,edit,delete) now accepts a list ID in additionto a name.
complete,uncomplete, andeditgained--format json, printing theaffected reminder as JSON.
EKReminderJSON output now includeslistId.This fork had already independently fixed "can't delete a completed reminder"
(keith#106) with a simpler approach than upstream's
--id/--indexflag redesign(auto-detecting whether the
deleteargument is a numeric index or an externalID). That existing fix is kept as-is — the two upstream commits whose sole
purpose was the flag redesign (
45e653f,cce8f74) are cherry-picked as emptycommits to credit wrobel for identifying and fixing the same underlying issue,
without changing
delete's behavior.Also fixed along the way (both were pre-existing bugs in the upstream diffs
themselves, not intentionally carried over):
add(...)method inReminders.swift.print(reminders.map { $0.title! })insetComplete.Test plan
swift build -Xswiftc -warnings-as-errorsswift test -Xswiftc -warnings-as-errors— 79 tests pass, including a newIdentifierTests.swiftcovering list/reminder ID resolution andcalendarIdentifier/listIdJSON encodingswift run reminders:show-listsplain/JSON,add/show/complete/editby both list name and list ID, anddeleteby external ID on an already-completed item