eventkit-rs
A Rust library and CLI for interacting with macOS Calendar events and Reminders via Apple's EventKit framework.
Features
- 📅 Calendar Events: Create, read, update, and delete calendar events
- ✅ Reminders: Full CRUD operations for reminders/tasks
- 🔐 Authorization: Safe handling of macOS privacy permissions
- 🦀 Pure Rust: Built on
objc2for safe Objective-C interop - 💻 CLI Included: Command-line tool for quick access
Installation
As a Library
Add to your Cargo.toml:
[]
= "0.1"
As a CLI Tool
Quick Start
Library Usage
use ;
CLI Usage
# Check authorization status
# === Reminders ===
# Request authorization
# List reminder lists
# List incomplete reminders
# List all reminders with details
# Create a reminder
# Complete a reminder
# Delete a reminder
# === Calendar Events ===
# Request authorization
# List calendars
# List today's events
# List next 14 days
# List with full details
# Create an event
# Create all-day event
# Show event details
# Delete an event
Platform Support
This library only works on macOS. It requires:
- macOS 10.14 (Mojave) or later
- Rust 1.70 or later
Privacy Permissions
Your application needs to request permission to access Calendar and/or Reminders data. Add these keys to your Info.plist:
<!-- For Reminders access -->
NSRemindersUsageDescription
This app needs access to your reminders to help you manage tasks.
<!-- For Calendar access (macOS 14+) -->
NSCalendarsFullAccessUsageDescription
This app needs access to your calendar to manage events.
<!-- For Calendar access (older macOS) -->
NSCalendarsUsageDescription
This app needs access to your calendar to manage events.
API Reference
RemindersManager
| Method | Description |
|---|---|
new() |
Create a new manager |
authorization_status() |
Check current auth status |
request_access() |
Request reminders permission |
list_calendars() |
List all reminder lists |
fetch_all_reminders() |
Fetch all reminders |
fetch_incomplete_reminders() |
Fetch incomplete reminders |
fetch_reminders(calendars) |
Fetch from specific lists |
create_reminder(...) |
Create a new reminder |
update_reminder(...) |
Update an existing reminder |
complete_reminder(id) |
Mark as complete |
uncomplete_reminder(id) |
Mark as incomplete |
delete_reminder(id) |
Delete a reminder |
EventsManager
| Method | Description |
|---|---|
new() |
Create a new manager |
authorization_status() |
Check current auth status |
request_access() |
Request calendar permission |
list_calendars() |
List all calendars |
fetch_today_events() |
Fetch today's events |
fetch_upcoming_events(days) |
Fetch next N days |
fetch_events(start, end, calendars) |
Fetch in date range |
create_event(...) |
Create a new event |
update_event(...) |
Update an existing event |
delete_event(id) |
Delete an event |
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Built with objc2 for Objective-C interop
- Inspired by the need for native Rust access to macOS productivity apps