TickTick CLI:管理任务与项目 - Openclaw Skills
作者:互联网
2026-03-26
什么是 TickTick CLI?
TickTick CLI 是 Openclaw Skills 的一个强大集成,将 TickTick 任务管理的全部功能直接带入您的终端。它允许开发人员和 AI 代理使用流线化的命令行界面以编程方式创建、更新和组织任务及项目。通过利用 TickTick Open API v1,该技能提供了从简单任务创建到复杂批量操作的高级命令。
该技能专为速度和自动化而设计,支持多种身份验证模式,包括适用于服务器的无头手动流程。无论您是在构建自动化个人助理,还是只想在编码时保持工作流,该工具都能弥合开发环境与任务管理器之间的差距。
下载入口:https://github.com/openclaw/skills/tree/main/skills/norickkevorkov/ticktick-cli
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install ticktick-cli
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 ticktick-cli。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
TickTick CLI 应用场景
- 通过 Shell 脚本或 CI/CD 流水线自动创建任务。
- 无需离开终端或 IDE 即可管理每日待办事项列表。
- 执行批量操作,例如在一次调用中放弃多个过时任务。
- 将 TickTick 任务跟踪集成到自主 AI 代理工作流中。
- 以 JSON 格式过滤和导出任务数据,用于自定义数据分析或报告。
- 用户通过 OAuth2 对 CLI 进行身份验证,从而获取安全存储在用户主目录本地的访问令牌。
- 通过使用 Bun 运行时的脚本发出命令,传递任务、列表或身份验证的参数。
- CLI 与 TickTick Open API v1 交互,以获取、创建或修改用户数据。
- 对于复杂操作,CLI 在执行特定任务操作之前将易读的项目名称解析为唯一 ID。
- 结果以易读文本或结构化 JSON 形式返回,允许进一步通过管道传输到其他工具。
TickTick CLI 配置指南
1. 注册应用程序
在 TickTick 开发者中心注册开发者应用,并将重定向 URI 设置为 http://localhost:8080 以获取您的凭据。
2. 身份验证
运行以下命令开始 OAuth 流程:
bun run scripts/ticktick.ts auth --client-id YOUR_CLIENT_ID --client-secret YOUR_CLIENT_SECRET
对于无头环境,添加 --manual 标志以复制粘贴授权码。
3. 验证连接
检查您的身份验证状态以确保 Openclaw Skills 集成已激活:
bun run scripts/ticktick.ts auth --status
TickTick CLI 数据架构与分类体系
该技能将配置和敏感凭据存储在 ~/.clawdbot/credentials/ticktick-cli/config.json 中。通过 --json 标志返回的数据遵循 TickTick API v1 架构。
| 字段 | 描述 |
|---|---|
clientId |
您的 TickTick OAuth2 客户端 ID |
accessToken |
用于身份验证请求的 Bearer 令牌 |
priority |
优先级:无、低、中或高 |
status |
任务生命周期状态:待办或已完成 |
dueDate |
ISO 8601 格式的日期或类似 "today" 的相对字符串 |
name: ticktick
description: Manage TickTick tasks and projects from the command line with OAuth2 auth, batch operations, and rate limit handling.
TickTick CLI Skill
Manage TickTick tasks and projects from the command line.
Setup
1. Register a TickTick Developer App
- Go to TickTick Developer Center
- Create a new application
- Set the redirect URI to
http://localhost:8080 - Note your
Client IDandClient Secret
2. Authenticate
# Set credentials and start OAuth flow
bun run scripts/ticktick.ts auth --client-id YOUR_CLIENT_ID --client-secret YOUR_CLIENT_SECRET
# Check authentication status
bun run scripts/ticktick.ts auth --status
# Logout (clear tokens, keep credentials)
bun run scripts/ticktick.ts auth --logout
Headless / Manual Authentication
# Use manual mode on headless servers
bun run scripts/ticktick.ts auth --client-id YOUR_CLIENT_ID --client-secret YOUR_CLIENT_SECRET --manual
This prints an authorization URL. Open it in a browser, approve access, then copy the full redirect URL (it looks like http://localhost:8080/?code=XXXXX&state=STATE) and paste it back into the CLI.
The CLI will open your browser to authorize access. After approving, tokens are stored in ~/.clawdbot/credentials/ticktick-cli/config.json.
Commands
List Tasks
# List all tasks
bun run scripts/ticktick.ts tasks
# List tasks from a specific project
bun run scripts/ticktick.ts tasks --list "Work"
# Filter by status
bun run scripts/ticktick.ts tasks --status pending
bun run scripts/ticktick.ts tasks --status completed
# JSON output
bun run scripts/ticktick.ts tasks --json
Create Task
# Basic task creation
bun run scripts/ticktick.ts task "Buy groceries" --list "Personal"
# With description and priority
bun run scripts/ticktick.ts task "Review PR" --list "Work" --content "Check the new auth changes" --priority high
# With due date
bun run scripts/ticktick.ts task "Submit report" --list "Work" --due tomorrow
bun run scripts/ticktick.ts task "Plan vacation" --list "Personal" --due "in 7 days"
bun run scripts/ticktick.ts task "Meeting" --list "Work" --due "2024-12-25"
# With tags
bun run scripts/ticktick.ts task "Research" --list "Work" --tag research important
Update Task
# Update by task name or ID
bun run scripts/ticktick.ts task "Buy groceries" --update --priority medium
bun run scripts/ticktick.ts task "abc123" --update --due tomorrow --content "Updated notes"
# Limit search to specific project
bun run scripts/ticktick.ts task "Review PR" --update --list "Work" --priority low
Complete Task
# Mark task as complete
bun run scripts/ticktick.ts complete "Buy groceries"
# Complete with project filter
bun run scripts/ticktick.ts complete "Review PR" --list "Work"
Abandon Task (Won't Do)
# Mark task as won't do
bun run scripts/ticktick.ts abandon "Old task"
# Abandon with project filter
bun run scripts/ticktick.ts abandon "Obsolete item" --list "Do"
Batch Abandon (Multiple Tasks)
# Abandon multiple tasks in a single API call
bun run scripts/ticktick.ts batch-abandon
# With JSON output
bun run scripts/ticktick.ts batch-abandon abc123def456... xyz789... --json
Note: batch-abandon requires task IDs (24-character hex strings), not task names. Use tasks --json to get task IDs first.
List Projects
# List all projects
bun run scripts/ticktick.ts lists
# JSON output
bun run scripts/ticktick.ts lists --json
Create Project
# Create new project
bun run scripts/ticktick.ts list "New Project"
# With color
bun run scripts/ticktick.ts list "Work Tasks" --color "#FF5733"
Update Project
# Rename project
bun run scripts/ticktick.ts list "Old Name" --update --name "New Name"
# Change color
bun run scripts/ticktick.ts list "Work" --update --color "#00FF00"
Options Reference
Priority Levels
none- No priority (default)low- Low prioritymedium- Medium priorityhigh- High priority
Due Date Formats
today- Due todaytomorrow- Due tomorrowin N days- Due in N days (e.g., "in 3 days")next monday- Next occurrence of weekday- ISO date -
YYYY-MM-DDor full ISO format
Global Options
--json- Output results in JSON format (useful for scripting)--help- Show help for any command
Agent Usage Tips
When using this skill as an AI agent:
- Always use
--jsonflag for machine-readable output - List projects first with
lists --jsonto get valid project IDs - Use project IDs rather than names when possible for reliability
- Check task status before completing to avoid errors
Example agent workflow:
# 1. Get available projects
bun run scripts/ticktick.ts lists --json
# 2. Create a task in a specific project
bun run scripts/ticktick.ts task "Agent task" --list "PROJECT_ID" --priority high --json
# 3. Later, mark it complete
bun run scripts/ticktick.ts complete "Agent task" --list "PROJECT_ID" --json
Configuration
Tokens are stored in ~/.clawdbot/credentials/ticktick-cli/config.json:
{
"clientId": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET",
"accessToken": "...",
"refreshToken": "...",
"tokenExpiry": 1234567890000,
"redirectUri": "http://localhost:8080"
}
Note: Credentials are stored in plaintext. The CLI attempts to set file permissions to 700/600; treat this file as sensitive.
The CLI automatically refreshes tokens when they expire.
Troubleshooting
"Not authenticated" error
Run bun run scripts/ticktick.ts auth to authenticate.
"Project not found" error
Use bun run scripts/ticktick.ts lists to see available projects and their IDs.
"Task not found" error
- Check the task title matches exactly (case-insensitive)
- Try using the task ID instead
- Use
--listto narrow the search to a specific project
Token expired errors
The CLI should auto-refresh tokens. If issues persist, run bun run scripts/ticktick.ts auth again.
API Notes
This CLI uses the TickTick Open API v1.
Rate Limits
- 100 requests per minute
- 300 requests per 5 minutes
The CLI makes multiple API calls per operation (listing projects to find task), so bulk operations can hit limits quickly.
Batch Endpoint
The CLI supports TickTick's batch endpoint for bulk operations:
POST https://api.ticktick.com/open/v1/batch/task
{
"add": [...], // CreateTaskInput[]
"update": [...], // UpdateTaskInput[]
"delete": [...] // { taskId, projectId }[]
}
Use batch-abandon to abandon multiple tasks in one API call. The batch API method is also exposed for programmatic use.
Other Limitations
- Maximum 500 tasks per project
- Some advanced features (focus time, habits) not supported by the API
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
信号管道:自动化营销情报工具 - Openclaw Skills
技能收益追踪器:监控 Openclaw 技能并实现变现
AI 合规准备就绪度:评估与治理工具 - Openclaw Skills
FOSMVVM ServerRequest 测试生成器:自动化 API 测试 - Openclaw Skills
酒店搜索器:AI 赋能的住宿与位置情报 - Openclaw Skills
Dub 链接 API:程序化链接管理 - Openclaw Skills
IntercomSwap:P2P BTC 与 USDT 跨链兑换 - Openclaw Skills
spotplay:macOS 原生 Spotify 播放控制 - Openclaw Skills
DeepSeek OCR:AI驱动的图像文本识别 - Openclaw Skills
Web Navigator:自动化网页研究与浏览 - Openclaw Skills
AI精选
