Manage Feishu tasks, including creating, viewing, updating, deleting, and completing tasks.
Usage
/feishu-task create --summary "任务标题" # 创建任务
/feishu-task list # 列出任务
/feishu-task list --completed # 列出已完成任务
/feishu-task get <task_id> # 获取任务详情
/feishu-task update <task_id> --summary "新标题" # 更新任务
/feishu-task complete <task_id> # 完成任务
/feishu-task delete <task_id> # 删除任务
CLI Command Details
1. Create Task
# 创建简单任务
feishu-cli task create --summary "完成项目文档"
# 创建带描述的任务
feishu-cli task create --summary "代码审查" --description "审查 PR #123"
# 创建带截止时间的任务
feishu-cli task create --summary "提交报告" --due "2024-12-31 18:00:00"
# 创建带来源链接的任务
feishu-cli task create --summary "处理 Issue" \
--origin-href "https://github.com/example/repo/issues/1"
# JSON 格式输出
feishu-cli task create --summary "测试任务" --output json
Parameter Description:
| Parameter | Short Form | Description | Required |
|---|---|---|---|
--summary |
-s |
Task title | Yes |
--description |
-d |
Task description | No |
--due |
Due time | No | |
--origin-href |
Task source link | No | |
--origin-platform |
Task source platform name | No (default feishu-cli) |
|
--output |
-o |
Output format (json) | No |
Due Time Format:
2024-12-31 18:00:00- Full format2024-12-31- Date only
2. List Tasks
# 列出所有任务
feishu-cli task list
# 列出已完成的任务
feishu-cli task list --completed
# 列出未完成的任务
feishu-cli task list --uncompleted
# 分页查询
feishu-cli task list --page-size 10
# JSON 格式输出
feishu-cli task list --output json
Parameter Description:
| Parameter | Description | Default Value |
|---|---|---|
--completed |
Show only completed tasks | false |
--uncompleted |
Show only incomplete tasks | false |
--page-size |
Number per page | 50 |
--page-token |
Pagination token | None |
--output, -o |
Output format | Text |
3. Get Task Details
feishu-cli task get <task_id>
# JSON 格式输出
feishu-cli task get <task_id> --output json
Output Example:
任务详情:
ID: e297ddff-06ca-4166-b917-4ce57cd3a7a0
标题: 完成项目文档
描述: 编写 Q1 项目技术文档
状态: 未完成
截止时间: 2024-12-31 18:00:00
创建时间: 2024-01-15 10:30:00
4. Update Task
# 更新任务标题
feishu-cli task update <task_id> --summary "新标题"
# 更新任务描述
feishu-cli task update <task_id> --description "新描述"
# 更新截止时间
feishu-cli task update <task_id> --due "2024-12-31 18:00:00"
# 通过 update 标记任务为已完成
feishu-cli task update <task_id> --completed
# JSON 格式输出
feishu-cli task update <task_id> --summary "新标题" --output json
Parameter Description:
| Parameter | Short Form | Description |
|---|---|---|
--summary |
-s |
New task title |
--description |
-d |
New task description |
--due |
New due time | |
--completed |
Mark the task as completed | |
--output |
-o |
Output format (json) |
5. Complete Task
feishu-cli task complete <task_id>
6. Delete Task
feishu-cli task delete <task_id>
Task Status Description
| Status | Description |
|---|---|
| Incomplete | Default status after task creation |
| Completed | Via complete or update --completed mark |
Typical Workflows
Create and Manage Tasks
# 1. 创建任务
feishu-cli task create --summary "完成代码审查" \
--description "审查 feature/new-api 分支" \
--due "2024-01-25 18:00:00"
# 2. 查看任务列表
feishu-cli task list --uncompleted
# 3. 完成任务
feishu-cli task complete <task_id>
Create Task from GitHub Issue
feishu-cli task create \
--summary "修复登录 Bug #42" \
--description "用户反馈登录偶尔失败" \
--origin-href "https://github.com/company/repo/issues/42" \
--due "2024-01-20"
Batch View Task Status
# 查看所有未完成任务
feishu-cli task list --uncompleted
# 查看已完成任务
feishu-cli task list --completed
# 导出为 JSON 便于处理
feishu-cli task list --output json
Update Task and Complete
# 1. 更新任务描述
feishu-cli task update <task_id> --description "已完成 80%,待最终测试"
# 2. 修改截止时间
feishu-cli task update <task_id> --due "2024-01-22 12:00:00"
# 3. 完成任务
feishu-cli task complete <task_id>
Notes
- Task ID: UUID format, such as
e297ddff-06ca-4166-b917-4ce57cd3a7a0 - Due time: Supports
YYYY-MM-DD HH:mm:ssorYYYY-MM-DDformat - Source link: Can link to external systems (such as GitHub, Jira)
- Permission requirements: The app needs to have task-related permissions
Permission Requirements (Important)
⚠️ The task feature requires enabling the following permissions for the app on the Feishu Open Platform:
task:task:read- Task read permission (for list/get)task:task:write- Task write permission (for create/update/delete/complete)
Application link: In the Feishu Open Platform app backend → Permission Management → Apply for the corresponding permissions
Verified Features
The following commands have been tested and verified:
task create✅ - Creating tasks works normallytask complete✅ - Task completion works normallytask delete✅ - Task deletion works normallytask list✅ - Listing tasks works normally (requirestask:task:readpermission)task get✅ - Getting task details works normally (requirestask:task:readpermission)
Error handling
| Error | Cause | Solution |
|---|---|---|
Access denied |
Insufficient permissions | Confirm that the app has been granted task:task:read and task:task:write permissions |
task not found |
Task does not exist | Check whether task_id is correct (UUID format) |
invalid parameter |
Parameter error | Check the --due time format and whether --summary is empty |