apple-cal-anywhere
Advanced Apple Calendar integration using CalDAV (RFC 4791) and Managed Attachments (RFC 8607).
Primary CLI
INLINECODE0
Capabilities
- - Event CRUD: List, Create, Update, Delete.
- Multi-Calendar Support: Query multiple calendars in a single command.
- True Attachments: RFC 8607 compatible (works on iPhone/iPad).
- Free/Busy: CalDAV scheduling lookup with event-derived fallback.
Common Commands
List Events (Combined)
Check multiple calendars at once:
CODEBLOCK0
Create All-Day Event
CODEBLOCK1
Attach a File (iPhone Safe)
CODEBLOCK2
Free/Busy Check
CODEBLOCK3
Notes
- - Birthdays: The virtual "Birthdays" calendar is not searchable via CalDAV. Key birthdays should be added as physical recurring events in the Family calendar for agent visibility.
- Auth: Resolution order is
APPLECAL_PASSWORD → Python keyring (if installed/configured) → macOS Keychain fallback. Run doctor to verify connectivity. - Event update clearing: Use
events update --clear-location / --clear-description to explicitly remove optional fields. - Attachment safety:
attach add blocks sensitive paths/names, allowlists file extensions, and supports optional directory scoping via APPLECAL_ATTACH_DIR. - Apple ID: Always pass
--apple-id your@icloud.com (the iCloud account email, not necessarily your Apple ID login).
apple-cal-anywhere
使用CalDAV(RFC 4791)和托管附件(RFC 8607)的高级Apple日历集成。
主要命令行接口
scripts/applecal.py
功能
- - 事件CRUD:列出、创建、更新、删除。
- 多日历支持:单条命令查询多个日历。
- 真实附件:兼容RFC 8607(可在iPhone/iPad上使用)。
- 空闲/忙碌:基于CalDAV的日程查询,并支持事件推导的备用方案。
常用命令
列出事件(合并)
同时检查多个日历:
bash
python3 scripts/applecal.py events list \
--apple-id your@icloud.com \
--calendar Family \
--calendar Work \
--from 2026-02-26T00:00:00Z \
--to 2026-02-26T23:59:59Z
创建全天事件
bash
python3 scripts/applecal.py events create \
--apple-id your@icloud.com \
--calendar Family \
--summary 生日 \
--start 2026-02-26 \
--end 2026-02-26 \
--all-day
附加文件(iPhone安全)
bash
python3 scripts/applecal.py attach add \
--apple-id your@icloud.com \
--calendar Family \
--uid
\
--file /path/to/document.pdf
空闲/忙碌检查
bash
python3 scripts/applecal.py freebusy \
--apple-id your@icloud.com \
--calendar Family \
--from 2026-02-26T00:00:00Z \
--to 2026-02-26T23:59:59Z
注意事项
- - 生日:虚拟的生日日历无法通过CalDAV搜索。关键生日应作为物理重复事件添加到家庭日历中,以便代理可见。
- 认证:解析顺序为 APPLECALPASSWORD → Python keyring(如果已安装/配置)→ macOS钥匙串备用方案。运行 doctor 验证连接。
- 事件更新清除:使用 events update --clear-location / --clear-description 显式移除可选字段。
- 附件安全:attach add 会阻止敏感路径/名称,对文件扩展名进行白名单管理,并支持通过 APPLECALATTACH_DIR 进行可选的目录范围限制。
- Apple ID:始终传递 --apple-id your@icloud.com(iCloud账户邮箱,不一定是您的Apple ID登录名)。