$ show openclaw/remindctl
remindctl is a macOS command-line interface for Apple Reminders, built with Swift and Apple's EventKit framework. It provides a comprehensive set of commands to create, edit, complete, delete, and search reminders, manage lists, set due dates, alarms, recurrence, location triggers, and URLs. The application is structured as a modular library (RemindCore) containing the core EventKit interaction and business logic, and a CLI executable (remindctl) that uses the Commander library for command routing and argument parsing. The CLI supports multiple output formats (JSON, plain, table, quiet) and includes advanced features like fuzzy list name resolution, stable numeric indexing across reordered fetches, and a custom async timeout pattern for system operations. The codebase demonstrates strong Swift concurrency practices (async/await, actors), comprehensive unit tests, and a well-documented release pipeline with signed notarized binaries and Homebrew distribution.
The LLM identified 5 files worth highlighting for reuse:
A generic async timeout pattern that wraps an asynchronous operation with a deadline. It uses a custom state machine with phases (waiting, claimed, finished) to ensure thread-safe handling of timeout, cancellation, and operation completion. The pattern supports claiming the result for synchronous conversion after the callback fires, and properly cancels both the timeout task and the underlying operation. This is a reusable concurrency utility applicable to any async operation that needs a timeout.
Implements a managed notes line that mirrors the EventKit URL field into the reminder's notes so it appears in Reminders.app. The component handles adding, replacing, and clearing the managed line while preserving authored text, different newline styles, and authored URL references. The algorithm correctly removes only the exact managed line and appends a new one, avoiding duplicates. This pattern is reusable for any tool that needs to embed metadata into user-editable text fields.
Resolves user-provided identifiers (numeric indexes or alphanumeric prefixes) against a list of reminders. Numeric indexes are resolved against a sorted view (default show), with a stable tie-breaking using the reminder ID. Prefix matching requires a minimum length of 4 characters and handles exact and case-insensitive matching. The component returns clear errors for invalid, ambiguous, or out-of-range identifiers. This pattern is reusable in any CLI that needs to allow users to reference items by index or partial ID.
Resolves list names using a three-tier strategy: exact match, case-insensitive match, then normalized match (ignoring emoji, punctuation, and diacritics). Returns clear errors for ambiguous matches and supports read-only multiple-match resolution. The normalized name function strips non-letter/digit Unicode scalars, making it robust for lists with emoji or special characters. This component is reusable for any application needing fuzzy name resolution against a set of identifiers.
Handles the mutation of date-based alarms on an EKReminder while preserving relative and location-based alarms. It identifies absolute date alarms to remove and optionally adds a new absolute alarm. This ensures that operations like changing the due date or clearing alarms do not inadvertently remove relative offsets or geofence triggers. The pattern is a clear example of selective mutation and is reusable for any EventKit alarm manipulation.