Todoist命令行工具Skill todoist

Todoist CLI 是一款用于在终端中高效管理 Todoist 待办事项的命令行工具。它支持任务列表、添加、修改、完成、删除等核心操作,并提供强大的过滤器、项目管理、标签和优先级功能。关键词:Todoist 命令行,任务管理,终端工具,生产力工具,待办事项,API 集成。

其他 1 次安装 8 次浏览 更新于 2/24/2026

name: todoist description: 通过 todoist CLI 管理 Todoist 任务(列出、添加、修改、完成、删除)。支持过滤器、项目、标签和优先级。 homepage: https://github.com/sachaos/todoist metadata: {“clawdbot”:{“emoji”:“✅”,“requires”:{“bins”:[“todoist”]},“install”:[{“id”:“brew”,“kind”:“brew”,“formula”:“todoist-cli”,“bins”:[“todoist”],“label”:“通过 Homebrew 安装 todoist-cli”}]}}

Todoist CLI

使用 todoist 直接在终端中管理 Todoist 任务。

设置

  1. 安装: brew install todoist-cli
  2. https://app.todoist.com/app/settings/integrations/developer 获取您的 API 令牌
  3. 创建配置文件:
mkdir -p ~/.config/todoist
echo '{"token": "YOUR_API_TOKEN"}' > ~/.config/todoist/config.json
  1. 同步: todoist sync

列出任务

todoist list                           # 所有任务
todoist list --filter "today"          # 今天到期
todoist list --filter "overdue"        # 逾期任务
todoist list --filter "p1"             # 优先级 1 (最高)
todoist list --filter "tomorrow"       # 明天到期
todoist list --filter "@work"          # 按标签
todoist list --filter "#Project"       # 按项目
todoist list --filter "(today | overdue) & p1"  # 组合过滤器

添加任务

todoist add "买牛奶"                                    # 简单任务
todoist add "给妈妈打电话" --priority 1                       # 带优先级 (1=最高, 4=最低)
todoist add "会议" --date "tomorrow 3pm"               # 带截止日期
todoist add "报告" --project-name "工作"                # 到特定项目
todoist add "审阅" --label-names "紧急,审阅"        # 带标签
todoist quick "明天买鸡蛋 p1 #购物 @杂事"   # 自然语言

修改任务

todoist modify 任务ID --content "新标题"
todoist modify 任务ID --priority 2
todoist modify 任务ID --date "下周一"

完成任务

todoist close 任务ID              # 完成任务
todoist close 任务ID 任务ID2     # 完成多个任务

删除任务

todoist delete 任务ID

查看详情

todoist show 任务ID               # 显示任务详情
todoist projects                   # 列出所有项目
todoist labels                     # 列出所有标签

同步

todoist sync                       # 将本地缓存与 Todoist 同步

输出格式

todoist list --csv                 # CSV 输出,用于脚本
todoist list --color               # 彩色输出
todoist list --namespace           # 将父任务显示为命名空间
todoist list --indent              # 缩进子任务

过滤器语法

Todoist CLI 支持 官方 Todoist 过滤器语法:

过滤器 描述
today 今天到期
tomorrow 明天到期
overdue 已过截止日期
no date 无截止日期
p1, p2, p3, p4 优先级等级
@label 按标签
#Project 按项目
assigned to: me 分配给您
7 days 未来 7 天内到期

使用 & (与), | (或), ! (非) 组合:

todoist list --filter "(today | overdue) & p1"
todoist list --filter "#Work & !@done"

注意事项

  • 在网页/移动端应用中进行更改后,请运行 todoist sync
  • 任务 ID 为数字 (例如 12345678)
  • 配置存储在 ~/.config/todoist/config.json
  • 缓存存储在 ~/.config/todoist/cache.json