简介
通过 CLI 管理 Todoist 任务、项目、标签和评论,支持自然语言日期、过滤查询和 JSON 输出,适合自动化工作流。
原始描述
Manage Todoist tasks, projects, labels, and comments via the todoist CLI wrapper. Use when a user asks to add tasks, list todos, complete items, manage projects, or interact with their Todoist account.
中文使用说明 来自收录源
核心用法
Todoist CLI Skill 是一个命令行封装工具,基于 Todoist REST API v2 实现,允许用户直接在终端中管理 Todoist 账户的全部核心功能。安装配置需获取 API Token 并设置环境变量,无需额外依赖(仅需系统自带的 curl 和 jq)。
功能覆盖
- 任务管理:创建、更新、完成、重新打开和删除任务,支持自然语言日期(如 "tomorrow"、"next monday at 9am")、优先级设置(p1-p4)、项目和标签关联
- 项目管理:创建、重命名、设置颜色、收藏和删除项目
- 分区管理:在项目内创建章节(Sections)以组织任务
- 标签管理:创建带颜色的自定义标签
- 评论系统:为任务或项目添加、查看和删除评论
过滤与查询
支持 Todoist 原生过滤语法,包括日期过滤器(today、overdue、7 days)、项目过滤(#ProjectName)、标签过滤(@label)、优先级过滤(p1-p4)以及复杂组合(& 和 | 逻辑运算)。
输出格式
所有命令返回 JSON 格式,便于与 jq 等工具配合进行数据处理和自动化脚本编写。
显著优点
- 全功能覆盖:几乎支持 Todoist Web/App 的全部核心功能,无需切换界面
- 自然语言日期:支持直观的日期输入,降低使用门槛
- 强大的过滤系统:原生支持复杂查询逻辑,便于快速定位任务
- JSON 输出标准化:易于集成到 CI/CD、定时任务或其他自动化流程
- 轻量依赖:仅依赖 curl 和 jq,几乎可在任何 Unix-like 环境运行
潜在缺点与局限性
- API Token 安全风险:Token 需存储在环境变量中,存在被泄露的风险;建议配合密码管理工具或密钥管理服务使用
- 无 OAuth 支持:仅支持个人 API Token,不适合多用户或企业级 SSO 场景
- 速率限制:受 Todoist API 速率限制约束(约 50 次/分钟),高频自动化场景需注意控制频率
- 离线不可用:完全依赖网络连接,无本地缓存机制
- 学习成本:过滤语法和命令行参数需要一定的学习时间
适合人群
- 习惯命令行工作流的开发者和技术用户
- 需要批量处理任务或自动化 Todoist 操作的用户
- 希望将任务管理集成到 shell 脚本、CI/CD 或定时任务中的工程师
- 偏好键盘操作、追求效率的重度 Todoist 用户
常规风险
- 数据误操作:命令行操作不可逆性较高,delete 操作无二次确认,建议操作前进行 dry-run 或备份
- Token 泄露:环境变量可能被其他进程读取,建议最小权限原则并定期轮换 Token
- 时间解析歧义:自然语言日期依赖 Todoist 服务器解析,不同时区或语言设置可能导致预期外结果
- API 变更风险:Todoist API 版本迭代可能导致 CLI 工具需同步更新
技能正文
name: todoist description: Manage Todoist tasks, projects, labels, and comments via the todoist CLI wrapper. Use when a user asks to add tasks, list todos, complete items, manage projects, or interact with their Todoist account.
Todoist CLI
Manage Todoist via the REST API v2.
Setup
- Get API token: Todoist → Settings → Integrations → Developer → API token
- Set environment variable:
export TODOIST_API_TOKEN="your_token_here" - Make CLI executable:
chmod +x ~/clawd/skills/todoist/scripts/todoist
CLI Location
~/clawd/skills/todoist/scripts/todoist
Quick Reference
Tasks
# List all tasks
todoist tasks
# List with filter
todoist tasks --filter "today"
todoist tasks --filter "overdue"
todoist tasks --filter "#Work"
todoist tasks --project PROJECT_ID
# Quick views
todoist today
todoist overdue
todoist upcoming
# Get single task
todoist task TASK_ID
# Add task
todoist add "Buy groceries"
todoist add "Call mom" --due tomorrow
todoist add "Meeting prep" --due "today 3pm" --priority 4
todoist add "Review PR" --project PROJECT_ID --labels "work,urgent"
todoist add "Write docs" --description "Include examples"
# Update task
todoist update TASK_ID --content "New title"
todoist update TASK_ID --due "next monday"
todoist update TASK_ID --priority 3
# Complete / reopen / delete
todoist complete TASK_ID
todoist reopen TASK_ID
todoist delete-task TASK_ID
Projects
# List projects
todoist projects
# Get project
todoist project PROJECT_ID
# Create project
todoist add-project "Work"
todoist add-project "Personal" --color blue --favorite
# Update project
todoist update-project PROJECT_ID --name "New Name"
todoist update-project PROJECT_ID --color red
# Delete project
todoist delete-project PROJECT_ID
Sections
# List sections
todoist sections
todoist sections PROJECT_ID
# Create section
todoist add-section --name "In Progress" --project PROJECT_ID
# Delete section
todoist delete-section SECTION_ID
Labels
# List labels
todoist labels
# Create label
todoist add-label "urgent"
todoist add-label "blocked" --color red
# Delete label
todoist delete-label LABEL_ID
Comments
# List comments
todoist comments --task TASK_ID
todoist comments --project PROJECT_ID
# Add comment
todoist add-comment "Need more info" --task TASK_ID
# Delete comment
todoist delete-comment COMMENT_ID
Filter Syntax
Todoist supports powerful filter queries:
| Filter | Description |
|---|---|
today |
Due today |
tomorrow |
Due tomorrow |
overdue |
Past due |
7 days |
Due in next 7 days |
no date |
No due date |
#ProjectName |
In specific project |
@label |
Has label |
p1, p2, p3, p4 |
Priority level |
assigned to: me |
Assigned to you |
created: today |
Created today |
Combine with & (and) or | (or):
todoist tasks --filter "today & #Work"
todoist tasks --filter "overdue | p1"
Due Date Strings
Natural language due dates:
today,tomorrow,yesterdaynext monday,next weekin 3 daysevery day,every weekdayevery monday at 9amJan 15,2026-01-20today at 3pm
Priority Levels
| Value | Meaning |
|---|---|
| 1 | Normal (default) |
| 2 | Medium |
| 3 | High |
| 4 | Urgent |
Output
All commands return JSON. Pipe to jq for formatting:
todoist tasks | jq '.[] | {id, content, due: .due.string}'
todoist today | jq -r '.[].content'
Notes
- Requires
curlandjq - All output is JSON for easy scripting
- Task IDs are numeric strings (e.g., "8765432109")
- Project IDs are also numeric strings
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。