Things Todo
用于 Peter 的 Mac 上的 Things 3 任务。优先使用 things 处理 Things 待办事项;仅当用户明确要求 Apple 提醒事项时才使用 $reminders。
工具
- CLI:
things - 仓库:
https://github.com/ossianhempel/things3-cli - 安装:
GOBIN=/opt/homebrew/bin go install github.com/ossianhempel/things3-cli/cmd/things@latest
更新 URL 操作的认证:
source ~/.profile >/dev/null 2>&1 || true
things auth
THINGS_AUTH_TOKEN 应来自 ~/.profile 或 1Password。切勿打印。things update --dry-run 必须将其隐去为 auth-token=***。
开始
使用 JSON 进行脚本化的读取和验证:
things tasks --format json --limit 20
things today --format json
things search "query" --format json
读取 Things 数据库可能需要调用应用拥有完全磁盘访问权限。写入应通过 Things URL Scheme 或 AppleScript 经由 things 进行;请勿直接写入 SQLite 数据库。
添加
默认操作:添加,然后搜索/读取返回。
things add "预订 LHR-SFO 直飞商务舱航班" --notes "仅限直飞。" --when tomorrow --tags travel
things tasks --search "LHR-SFO" --format json
有用标志:
--notes "文本"--when today|tomorrow|evening|anytime|someday|YYYY-MM-DD--deadline YYYY-MM-DD--list "项目或区域"--tags tag1,tag2--checklist-item "文本"可重复--dry-run检查things:///URL 而不实际变更。
更新 / 删除
先查找 UUID,再通过 ID 进行变更:
things tasks --search "flight" --format json
things update --id <uuid> "新标题" --notes "已更新备注"
things tasks --search "新标题" --format json
things delete --id <uuid> --confirm <uuid>
things tasks --search "新标题" --format json
things trash --search "新标题" --format json
写入后务必读取返回。删除会将项目移至 Things 回收站;在需要确认清理时,验证普通搜索结果为空且回收站搜索结果包含该项目。
约定
- 将模糊的请求转化为具体的下一步行动标题。
- 当用户明确表示只是记录而非重写时,保留原有措辞。
- 将无关操作拆分为单独的待办事项。
- 仅在用户暗示时使用“今天”;否则默认使用收件箱/随时。
- 在批量更新/删除前优先使用
--dry-run。 - 对于当前日期计算,运行
date;不要猜测。
注意事项
- 仅限 macOS;如果 Things.app 在远程主机上缺失或不可见,远程主机可能显示版本为
UNKNOWN。 update需要THINGS_AUTH_TOKEN;add不需要。--tags在添加/更新中为复数形式;tasks --tag在过滤中为单数形式。todayJSON 可能显示start: Anytime加上一个真实的start_date;要验证 Today 列表位置,请使用命令成员关系/读取返回,而不是仅依赖某一个字段。