mcpField
T
things-mac

things-mac

github.com/nweii生产力1045 次安装1 周前更新
代码仓库

关于 things-mac

此 Skill 介绍如何在 macOS 上通过 `things` 命令行工具读取和管理本地 Things 3 数据库,涵盖任务查询、创建、更新及项目、区域和标签管理。

主要功能

  1. 01读取收件箱、今日、即将到期和截止事项
  2. 02搜索并查看任务、项目和区域
  3. 03创建带日程或检查清单的任务
  4. 04更新任务、项目、标签和备注
  5. 05使用 dry-run 预览更改

适用场景

  1. 01按关键词或项目查找任务
  2. 02为任务安排日程和截止时间
  3. 03将待办归入项目、区域和标签
  4. 04应用更新前先预览更改

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/nweii/agent-stuff --skill things-mac

安装后在 Claude Code 中输入/things-mac确认已加载。

详细介绍

Things 3 CLI

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

设置

  • 检查是否已安装:which things(如果返回路径,则跳过安装)
  • 安装(Homebrew):brew install ossianhempel/tap/things3-cli
  • 安装(Go,推荐用于 Apple Silicon):GOBIN=/opt/homebrew/bin go install github.com/ossianhempel/things3-cli/cmd/things@latest
  • 可选:设置 THINGSDB(或传入 --db),指向 ThingsData-* 文件夹。
Things 认证令牌

更新操作需要认证令牌。请在 shell 配置文件(例如 ~/.zshrc)中设置 THINGS_AUTH_TOKEN,以便持久保存。

只读(DB)

  • things inbox --limit 50
  • things today / things logtoday / things createdtoday
  • things upcoming / things deadlines
  • things search "query"
  • things projects / things areas / things tags
  • 检查内容:
    • things show "Area Name" / things show "Project Name"
    • things tasks --area "Area Name"
    • things tasks --project "Project Name"

写入(URL scheme)

  • 优先使用安全预览:things --dry-run add "Title"
  • 添加:things add "Title" --notes "..." --when today --deadline 2026-01-02
  • 安排时间:--when=someday、--later(今天傍晚)、--when=evening
  • 将 Things 切换到前台:things --foreground add "Title"

示例

添加待办事项
  • 基本用法:things add "Buy milk"
  • 添加备注:things add "Buy milk" --notes "2% + bananas"
  • 添加到项目/领域:things add "Book flights" --list "Travel"
  • 添加到项目标题下:things add "Pack charger" --list "Travel" --heading "Before"
  • 添加标签:things add "Call dentist" --tags "health,phone"
  • 检查清单:things add "Trip prep" --checklist-item "Passport" --checklist-item "Tickets"
  • 重复事项:things add "Daily standup" --repeat day --repeat-mode schedule
  • 从 STDIN 输入(多行内容将作为标题和备注):
    • cat <<'EOF' | things add -
    • Title line
    • Notes line 1
    • Notes line 2
    • EOF
项目和领域
  • 添加领域:things add-area "Health"
  • 添加项目:things add-project "New Site" --area "Work" --notes "Plan out the redesign"
  • 更新项目:things update-project --id <UUID> --auth-token <TOKEN> "New Title" --notes "Updated notes"
修改待办事项(需要认证令牌)
  • 首先获取 ID(UUID 列):things search "milk" --limit 5
  • 认证:设置 THINGS_AUTH_TOKEN 或传入 --auth-token <TOKEN>
  • 标题:things update --id <UUID> --auth-token <TOKEN> "New title"
  • 替换备注:things update --id <UUID> --auth-token <TOKEN> --notes "New notes"
  • 追加/前置备注:things update --id <UUID> --auth-token <TOKEN> --append-notes "..." / --prepend-notes "..."
  • 移动列表:things update --id <UUID> --auth-token <TOKEN> --list "Travel" --heading "Before"
  • 替换/添加标签:things update --id <UUID> --auth-token <TOKEN> --tags "a,b" / things update --id <UUID> --auth-token <TOKEN> --add-tags "a,b"
  • 完成/取消(类似软删除):things update --id <UUID> --auth-token <TOKEN> --completed / --canceled
  • 安全预览:things --dry-run update --id <UUID> --auth-token <TOKEN> --completed
删除待办事项
  • 可通过 AppleScript 执行:things delete --id <UUID>
  • 也支持:delete-project --id <UUID> 和 delete-area --id <UUID>
  • 注意:此操作会交互式请求确认。非交互式脚本请使用 --confirm。
  • 也可以通过 things update --id <UUID> --completed / --canceled 将其标记为已完成/已取消(需要认证令牌)。

备注

  • 仅支持 macOS。
  • --dry-run 会打印 URL,但不会打开 Things。

评论

支持 Markdown