Things3命令行工具 things-mac

Things 3 命令行工具 (things-mac) 是一个专为 macOS 设计的效率工具,允许用户通过命令行界面 (CLI) 与 Things 3 任务管理应用进行交互。核心功能包括:通过本地数据库读取(如列出收件箱、今日任务、搜索、查看项目/区域/标签)以及通过 URL 方案写入(添加、更新待办事项)。它支持任务创建、修改(需认证令牌)、添加备注、标签、截止日期和清单,并可通过安全预览(--dry-run)避免误操作。此工具是自动化工作流、开发者集成和快速任务管理的理想选择,关键词包括:Things 3 CLI、macOS 任务管理、命令行待办事项、自动化工作流、效率工具、Go 语言开发。

DevOps 0 次安装 0 次浏览 更新于 2/24/2026

name: things-mac description: 通过 macOS 上的 things CLI 管理 Things 3(通过 URL 方案添加/更新项目和待办事项;从本地 Things 数据库读取/搜索/列出)。当用户要求 OpenClaw 向 Things 添加任务、列出收件箱/今日/即将到来、搜索任务或检查项目/区域/标签时使用。 homepage: https://github.com/ossianhempel/things3-cli metadata: { “openclaw”: { “emoji”: “✅”, “os”: [“darwin”], “requires”: { “bins”: [“things”] }, “install”: [ { “id”: “go”, “kind”: “go”, “module”: “github.com/ossianhempel/things3-cli/cmd/things@latest”, “bins”: [“things”], “label”: “安装 things3-cli (go)”, }, ], }, }

Things 3 命令行工具

使用 things 读取您的本地 Things 数据库(收件箱/今日/搜索/项目/区域/标签),并通过 Things URL 方案添加/更新待办事项。

设置

  • 安装(推荐,Apple Silicon):GOBIN=/opt/homebrew/bin go install github.com/ossianhempel/things3-cli/cmd/things@latest
  • 如果数据库读取失败:授予调用应用程序完全磁盘访问权限(手动运行时为 Terminal;网关运行时为 OpenClaw.app)。
  • 可选:设置 THINGSDB(或传递 --db)以指向您的 ThingsData-* 文件夹。
  • 可选:设置 THINGS_AUTH_TOKEN 以避免在更新操作时传递 --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 "机票"
  • 从 STDIN 输入(多行 => 标题 + 备注):
    • cat <<'EOF' | things add -
    • 标题行
    • 备注行 1
    • 备注行 2
    • EOF

示例:修改待办事项(需要认证令牌)

  • 第一步:获取 ID(UUID 列):things search "牛奶" --limit 5
  • 认证:设置 THINGS_AUTH_TOKEN 或传递 --auth-token <令牌>
  • 标题:things update --id <UUID> --auth-token <令牌> "新标题"
  • 替换备注:things update --id <UUID> --auth-token <令牌> --notes "新备注"
  • 追加/前置备注:things update --id <UUID> --auth-token <令牌> --append-notes "..." / --prepend-notes "..."
  • 移动列表:things update --id <UUID> --auth-token <令牌> --list "旅行" --heading "出发前"
  • 替换/添加标签:things update --id <UUID> --auth-token <令牌> --tags "a,b" / things update --id <UUID> --auth-token <令牌> --add-tags "a,b"
  • 完成/取消(软删除):things update --id <UUID> --auth-token <令牌> --completed / --canceled
  • 安全预览:things --dry-run update --id <UUID> --auth-token <令牌> --completed

删除待办事项?

  • things3-cli 目前不支持(没有“删除/移至废纸篓”的写入命令;things trash 是只读列表)。
  • 选项:使用 Things 用户界面删除/移至废纸篓,或通过 things update 标记为 --completed / --canceled

注意事项

  • 仅限 macOS。
  • --dry-run 打印 URL 但不打开 Things。