Things 3 CLI
Use things to read your local Things database (inbox/today/search/projects/areas/tags) and to add/update todos via the Things URL scheme.
Setup
- - Install (recommended, Apple Silicon): INLINECODE1
- If DB reads fail: grant Full Disk Access to the calling app (Terminal for manual runs;
Clawdbot.app for gateway runs). - Optional: set
THINGSDB (or pass --db) to point at your ThingsData-* folder. - Optional: set
THINGS_AUTH_TOKEN to avoid passing --auth-token for update ops.
Read-only (DB)
- - INLINECODE8
- INLINECODE9
- INLINECODE10
- INLINECODE11
- INLINECODE12 /
things areas / INLINECODE14
Write (URL scheme)
- - Prefer safe preview: INLINECODE15
- Add: INLINECODE16
- Bring Things to front: INLINECODE17
Examples: add a todo
- - Basic: INLINECODE18
- With notes: INLINECODE19
- Into a project/area: INLINECODE20
- Into a project heading: INLINECODE21
- With tags: INLINECODE22
- Checklist: INLINECODE23
- From STDIN (multi-line => title + notes):
-
cat <<'EOF' | things add -
-
Title line
-
Notes line 1
-
Notes line 2
- INLINECODE28
Examples: modify a todo (needs auth token)
- - First: get the ID (UUID column): INLINECODE29
- Auth: set
THINGS_AUTH_TOKEN or pass INLINECODE31 - Title: INLINECODE32
- Notes replace: INLINECODE33
- Notes append/prepend:
things update --id <UUID> --auth-token <TOKEN> --append-notes "..." / INLINECODE35 - Move lists: INLINECODE36
- Tags replace/add:
things update --id <UUID> --auth-token <TOKEN> --tags "a,b" / INLINECODE38 - Complete/cancel (soft-delete-ish):
things update --id <UUID> --auth-token <TOKEN> --completed / INLINECODE40 - Safe preview: INLINECODE41
Delete a todo?
- - Not supported by
things3-cli right now (no “delete/move-to-trash” write command; things trash is read-only listing). - Options: use Things UI to delete/trash, or mark as
--completed / --canceled via things update.
Notes
- - macOS-only.
- INLINECODE47 prints the URL and does not open Things.
Things 3 命令行工具
使用 things 命令读取本地 Things 数据库(收件箱/今日/搜索/项目/领域/标签),并通过 Things URL 方案添加/更新待办事项。
安装
- - 推荐安装方式(Apple Silicon):GOBIN=/opt/homebrew/bin go install github.com/ossianhempel/things3-cli/cmd/things@latest
- 如果数据库读取失败:为调用应用授予完全磁盘访问权限(手动运行时为终端;网关运行时为 Clawdbot.app)
- 可选:设置 THINGSDB(或传递 --db 参数)指向你的 ThingsData-* 文件夹
- 可选:设置 THINGSAUTHTOKEN 以避免在更新操作时传递 --auth-token
只读操作(数据库)
- - things inbox --limit 50
- things today
- things upcoming
- things search 查询内容
- things projects / things areas / things tags
写入操作(URL 方案)
- - 安全预览:things --dry-run add 标题
- 添加:things add 标题 --notes ... --when today --deadline 2026-01-02
- 将 Things 置前:things --foreground add 标题
示例:添加待办事项
- - 基础:things add 买牛奶
- 带备注:things add 买牛奶 --notes 2%牛奶 + 香蕉
- 添加到项目/领域:things add 预订机票 --list 旅行
- 添加到项目标题下:things add 打包充电器 --list 旅行 --heading 出发前
- 带标签:things add 预约牙医 --tags 健康,电话
- 清单:things add 旅行准备 --checklist-item 护照 --checklist-item 机票
- 从标准输入读取(多行 => 标题 + 备注):
- cat <
示例:修改待办事项(需要认证令牌)
- - 首先:获取 ID(UUID 列):things search 牛奶 --limit 5
- 认证:设置 THINGSAUTHTOKEN 或传递 --auth-token <令牌>
- 标题:things update --id --auth-token <令牌> 新标题
- 替换备注:things update --id --auth-token <令牌> --notes 新备注
- 追加/前置备注:things update --id --auth-token <令牌> --append-notes ... / --prepend-notes ...
- 移动列表:things update --id --auth-token <令牌> --list 旅行 --heading 出发前
- 替换/添加标签:things update --id --auth-token <令牌> --tags a,b / things update --id --auth-token <令牌> --add-tags a,b
- 完成/取消(类似软删除):things update --id --auth-token <令牌> --completed / --canceled
- 安全预览:things --dry-run update --id --auth-token <令牌> --completed
删除待办事项?
- - things3-cli 目前不支持(没有删除/移至废纸篓的写入命令;things trash 是只读列表)
- 替代方案:使用 Things 界面删除/丢弃,或通过 things update 标记为 --completed / --canceled
注意事项
- - 仅限 macOS 系统
- --dry-run 会打印 URL 但不会打开 Things