介绍
# calctl - Apple Calendar CLI
通过命令行管理 Apple 日历,使用 icalBuddy(快速读取)和 AppleScript(写入)。
**要求:** `brew install ical-buddy`
## 命令
| 命令 | 描述 | |---------|-------------| | `calctl calendars` | 列出所有日历 | | `calctl show [filter]` | 显示事件(今天、明天、本周、YYYY-MM-DD)| | `calctl add <title>` | 创建新事件 | | `calctl search <query>` | 按标题搜索事件(未来 30 天)|
## 示例
```bash # List calendars calctl calendars
# Show today's events calctl show today
# Show this week's events calctl show week
# Show events from specific calendar calctl show week --calendar Work
# Show events on specific date calctl show 2026-01-25
# Add an event calctl add "Meeting with John" --date 2026-01-22 --time 14:00
# Add event to specific calendar calctl add "Team Standup" --calendar Work --date 2026-01-22 --time 09:00 --end 09:30
# Add all-day event calctl add "Holiday" --date 2026-01-25 --all-day
# Add event with notes calctl add "Project Review" --date 2026-01-22 --time 15:00 --notes "Bring quarterly report"
# Search for events calctl search "meeting" ```
## `add` 命令的选项
| 选项 | 描述 | 默认值 | |--------|-------------|---------| | `-c, --calendar <name>` | 要添加事件的日历 | Privat | | `-d, --date <YYYY-MM-DD>` | 事件日期 | 今天 | | `-t, --time <HH:MM>` | 开始时间 | 09:00 | | `-e, --end <HH:MM>` | 结束时间 | 开始时间后 1 小时 | | `-n, --notes <text>` | 事件备注 | 无 | | `--all-day` | 创建全天事件 | false |
## 可用日历
此系统上的常用日历: - Privat (个人) - Work - Familien Kalender - rainbat solutions GmbH - TimeTrack