feishu-cli-calendar
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese飞书日历操作技能
Feishu Calendar Operation Skill
管理飞书日历和日程,包括列出日历、创建/查看/更新/删除日程等。
Manage Feishu calendars and schedules, including listing calendars, creating/viewing/updating/deleting schedules, etc.
使用方法
Usage
bash
/feishu-calendar list # 列出所有日历
/feishu-calendar list-events <calendar_id> # 列出日历中的日程
/feishu-calendar create-event --calendar-id <id> ... # 创建日程
/feishu-calendar get-event <calendar_id> <event_id> # 获取日程详情
/feishu-calendar update-event <calendar_id> <event_id> # 更新日程
/feishu-calendar delete-event <calendar_id> <event_id> # 删除日程bash
/feishu-calendar list # List all calendars
/feishu-calendar list-events <calendar_id> # List events in a calendar
/feishu-calendar create-event --calendar-id <id> ... # Create an event
/feishu-calendar get-event <calendar_id> <event_id> # Get event details
/feishu-calendar update-event <calendar_id> <event_id> # Update an event
/feishu-calendar delete-event <calendar_id> <event_id> # Delete an eventCLI 命令详解
CLI Command Details
1. 列出日历
1. List Calendars
bash
feishu-cli calendar list输出示例:
日历列表:
1. 日历ID: CAL_xxx
名称: 我的日历
类型: primary
2. 日历ID: CAL_yyy
名称: 团队日历
类型: sharedbash
feishu-cli calendar listOutput Example:
Calendar List:
1. Calendar ID: CAL_xxx
Name: My Calendar
Type: primary
2. Calendar ID: CAL_yyy
Name: Team Calendar
Type: shared2. 创建日程
2. Create an Event
bash
undefinedbash
undefined基本用法
Basic usage
feishu-cli calendar create-event
--calendar-id CAL_ID
--summary "日程标题"
--start 2024-01-21T14:00:00+08:00
--end 2024-01-21T15:00:00+08:00
--calendar-id CAL_ID
--summary "日程标题"
--start 2024-01-21T14:00:00+08:00
--end 2024-01-21T15:00:00+08:00
feishu-cli calendar create-event
--calendar-id CAL_ID
--summary "Event Title"
--start 2024-01-21T14:00:00+08:00
--end 2024-01-21T15:00:00+08:00
--calendar-id CAL_ID
--summary "Event Title"
--start 2024-01-21T14:00:00+08:00
--end 2024-01-21T15:00:00+08:00
带描述和地点
With description and location
feishu-cli calendar create-event
--calendar-id CAL_ID
--summary "项目评审"
--start 2024-01-21T14:00:00+08:00
--end 2024-01-21T16:00:00+08:00
--description "Q1 项目进度评审"
--location "会议室 A101"
--calendar-id CAL_ID
--summary "项目评审"
--start 2024-01-21T14:00:00+08:00
--end 2024-01-21T16:00:00+08:00
--description "Q1 项目进度评审"
--location "会议室 A101"
feishu-cli calendar create-event
--calendar-id CAL_ID
--summary "Project Review"
--start 2024-01-21T14:00:00+08:00
--end 2024-01-21T16:00:00+08:00
--description "Q1 Project Progress Review"
--location "Meeting Room A101"
--calendar-id CAL_ID
--summary "Project Review"
--start 2024-01-21T14:00:00+08:00
--end 2024-01-21T16:00:00+08:00
--description "Q1 Project Progress Review"
--location "Meeting Room A101"
JSON 格式输出
JSON format output
feishu-cli calendar create-event
--calendar-id CAL_ID
--summary "会议"
--start 2024-01-21T14:00:00+08:00
--end 2024-01-21T15:00:00+08:00
--output json
--calendar-id CAL_ID
--summary "会议"
--start 2024-01-21T14:00:00+08:00
--end 2024-01-21T15:00:00+08:00
--output json
**参数说明**:
| 参数 | 简写 | 说明 | 必填 |
|------|------|------|------|
| `--calendar-id` | `-c` | 日历 ID | 是 |
| `--summary` | `-s` | 日程标题 | 是 |
| `--start` | | 开始时间(RFC3339 格式) | 是 |
| `--end` | | 结束时间(RFC3339 格式) | 是 |
| `--description` | `-d` | 日程描述 | 否 |
| `--location` | `-l` | 地点 | 否 |
| `--output` | `-o` | 输出格式(json) | 否 |feishu-cli calendar create-event
--calendar-id CAL_ID
--summary "Meeting"
--start 2024-01-21T14:00:00+08:00
--end 2024-01-21T15:00:00+08:00
--output json
--calendar-id CAL_ID
--summary "Meeting"
--start 2024-01-21T14:00:00+08:00
--end 2024-01-21T15:00:00+08:00
--output json
**Parameter Description**:
| Parameter | Shortcut | Description | Required |
|------|------|------|------|
| `--calendar-id` | `-c` | Calendar ID | Yes |
| `--summary` | `-s` | Event title | Yes |
| `--start` | | Start time (RFC3339 format) | Yes |
| `--end` | | End time (RFC3339 format) | Yes |
| `--description` | `-d` | Event description | No |
| `--location` | `-l` | Location | No |
| `--output` | `-o` | Output format (json) | No |3. 列出日程
3. List Events
bash
undefinedbash
undefined列出所有日程
List all events
feishu-cli calendar list-events CAL_ID
feishu-cli calendar list-events CAL_ID
指定时间范围
Specify time range
feishu-cli calendar list-events CAL_ID
--start-time 2024-01-01T00:00:00+08:00
--end-time 2024-01-31T23:59:59+08:00
--start-time 2024-01-01T00:00:00+08:00
--end-time 2024-01-31T23:59:59+08:00
feishu-cli calendar list-events CAL_ID
--start-time 2024-01-01T00:00:00+08:00
--end-time 2024-01-31T23:59:59+08:00
--start-time 2024-01-01T00:00:00+08:00
--end-time 2024-01-31T23:59:59+08:00
分页查询
Pagination query
feishu-cli calendar list-events CAL_ID --page-size 20
feishu-cli calendar list-events CAL_ID --page-size 20
JSON 格式输出
JSON format output
feishu-cli calendar list-events CAL_ID --output json
**参数说明**:
| 参数 | 说明 | 默认值 |
|------|------|--------|
| `--start-time` | 开始时间过滤 | 无 |
| `--end-time` | 结束时间过滤 | 无 |
| `--page-size` | 每页数量 | 50 |
| `--page-token` | 分页标记 | 无 |
| `--output, -o` | 输出格式 | 文本 |feishu-cli calendar list-events CAL_ID --output json
**Parameter Description**:
| Parameter | Description | Default Value |
|------|------|--------|
| `--start-time` | Start time filter | None |
| `--end-time` | End time filter | None |
| `--page-size` | Number of items per page | 50 |
| `--page-token` | Pagination token | None |
| `--output, -o` | Output format | Text |4. 获取日程详情
4. Get Event Details
bash
feishu-cli calendar get-event CAL_ID EVENT_IDbash
feishu-cli calendar get-event CAL_ID EVENT_ID5. 更新日程
5. Update an Event
bash
undefinedbash
undefined更新标题
Update title
feishu-cli calendar update-event CAL_ID EVENT_ID --summary "新标题"
feishu-cli calendar update-event CAL_ID EVENT_ID --summary "New Title"
更新时间
Update time
feishu-cli calendar update-event CAL_ID EVENT_ID
--start 2024-01-21T15:00:00+08:00
--end 2024-01-21T16:00:00+08:00
--start 2024-01-21T15:00:00+08:00
--end 2024-01-21T16:00:00+08:00
feishu-cli calendar update-event CAL_ID EVENT_ID
--start 2024-01-21T15:00:00+08:00
--end 2024-01-21T16:00:00+08:00
--start 2024-01-21T15:00:00+08:00
--end 2024-01-21T16:00:00+08:00
更新多个字段
Update multiple fields
feishu-cli calendar update-event CAL_ID EVENT_ID
--summary "更新后的会议"
--description "会议内容已更新"
--location "会议室 B202"
--summary "更新后的会议"
--description "会议内容已更新"
--location "会议室 B202"
**参数说明**:
| 参数 | 简写 | 说明 |
|------|------|------|
| `--summary` | `-s` | 新的日程标题 |
| `--start` | | 新的开始时间 |
| `--end` | | 新的结束时间 |
| `--description` | `-d` | 新的日程描述 |
| `--location` | `-l` | 新的地点 |
| `--output` | `-o` | 输出格式(json) |feishu-cli calendar update-event CAL_ID EVENT_ID
--summary "Updated Meeting"
--description "Meeting content has been updated"
--location "Meeting Room B202"
--summary "Updated Meeting"
--description "Meeting content has been updated"
--location "Meeting Room B202"
**Parameter Description**:
| Parameter | Shortcut | Description |
|------|------|------|
| `--summary` | `-s` | New event title |
| `--start` | | New start time |
| `--end` | | New end time |
| `--description` | `-d` | New event description |
| `--location` | `-l` | New location |
| `--output` | `-o` | Output format (json) |6. 删除日程
6. Delete an Event
bash
feishu-cli calendar delete-event CAL_ID EVENT_IDbash
feishu-cli calendar delete-event CAL_ID EVENT_ID时间格式说明
Time Format Description
使用 RFC3339 格式,示例:
- - 北京时间 14:00
2024-01-21T14:00:00+08:00 - - UTC 时间 06:00
2024-01-21T06:00:00Z
常见时区:
| 时区 | 偏移量 | 示例 |
|---|---|---|
| 北京时间 | | |
| UTC | | |
| 东京时间 | | |
Use RFC3339 format, examples:
- - Beijing Time 14:00
2024-01-21T14:00:00+08:00 - - UTC Time 06:00
2024-01-21T06:00:00Z
Common Time Zones:
| Time Zone | Offset | Example |
|---|---|---|
| Beijing Time | | |
| UTC | | |
| Tokyo Time | | |
典型工作流
Typical Workflow
查看今日日程
View Today's Events
bash
undefinedbash
undefined1. 获取日历列表
1. Get calendar list
feishu-cli calendar list
feishu-cli calendar list
2. 查看指定日历今日日程
2. View today's events in the specified calendar
feishu-cli calendar list-events CAL_ID
--start-time 2024-01-21T00:00:00+08:00
--end-time 2024-01-21T23:59:59+08:00
--start-time 2024-01-21T00:00:00+08:00
--end-time 2024-01-21T23:59:59+08:00
undefinedfeishu-cli calendar list-events CAL_ID
--start-time 2024-01-21T00:00:00+08:00
--end-time 2024-01-21T23:59:59+08:00
--start-time 2024-01-21T00:00:00+08:00
--end-time 2024-01-21T23:59:59+08:00
undefined创建会议日程
Create a Meeting Event
bash
undefinedbash
undefined1. 获取日历 ID
1. Get calendar ID
feishu-cli calendar list
feishu-cli calendar list
2. 创建日程
2. Create event
feishu-cli calendar create-event
--calendar-id CAL_xxx
--summary "周会"
--start 2024-01-21T10:00:00+08:00
--end 2024-01-21T11:00:00+08:00
--description "每周团队例会"
--location "会议室 101"
--calendar-id CAL_xxx
--summary "周会"
--start 2024-01-21T10:00:00+08:00
--end 2024-01-21T11:00:00+08:00
--description "每周团队例会"
--location "会议室 101"
undefinedfeishu-cli calendar create-event
--calendar-id CAL_xxx
--summary "Weekly Meeting"
--start 2024-01-21T10:00:00+08:00
--end 2024-01-21T11:00:00+08:00
--description "Weekly Team Meeting"
--location "Meeting Room 101"
--calendar-id CAL_xxx
--summary "Weekly Meeting"
--start 2024-01-21T10:00:00+08:00
--end 2024-01-21T11:00:00+08:00
--description "Weekly Team Meeting"
--location "Meeting Room 101"
undefined修改日程时间
Modify Event Time
bash
undefinedbash
undefined1. 获取日程列表
1. Get event list
feishu-cli calendar list-events CAL_ID
feishu-cli calendar list-events CAL_ID
2. 更新日程时间
2. Update event time
feishu-cli calendar update-event CAL_ID EVENT_ID
--start 2024-01-21T15:00:00+08:00
--end 2024-01-21T16:00:00+08:00
--start 2024-01-21T15:00:00+08:00
--end 2024-01-21T16:00:00+08:00
undefinedfeishu-cli calendar update-event CAL_ID EVENT_ID
--start 2024-01-21T15:00:00+08:00
--end 2024-01-21T16:00:00+08:00
--start 2024-01-21T15:00:00+08:00
--end 2024-01-21T16:00:00+08:00
undefined命令别名
Command Aliases
calendarcalbash
feishu-cli cal list
feishu-cli cal list-events CAL_IDThe command supports the alias :
calendarcalbash
feishu-cli cal list
feishu-cli cal list-events CAL_ID错误处理
Error Handling
| 错误 | 原因 | 解决 |
|---|---|---|
| 权限不足 | 检查应用是否开通日历权限 |
| 日历 ID 无效 | 先用 |
| 日程 ID 无效 | 先用 |
| 时间格式错误 | 使用 RFC3339 格式(含时区) |
| API 限流 | 等待几秒后重试 |
| Error | Cause | Solution |
|---|---|---|
| Insufficient permissions | Check if the app has calendar permissions enabled |
| Invalid calendar ID | Use |
| Invalid event ID | Use |
| Incorrect time format | Use RFC3339 format (including time zone) |
| API rate limit exceeded | Wait a few seconds and try again |
注意事项
Notes
- 日历 ID:创建日程前需要先通过 获取日历 ID
calendar list - 时间格式:必须使用 RFC3339 格式,包含时区信息
- 权限要求:需要应用具有日历相关权限
- 创建日历:当前 CLI 不支持创建新日历,只能使用已有日历创建日程
- Calendar ID: You need to get the calendar ID via before creating an event
calendar list - Time Format: Must use RFC3339 format with time zone information
- Permission Requirements: The app needs to have calendar-related permissions
- Create Calendar: The current CLI does not support creating new calendars; you can only use existing calendars to create events
权限要求(重要)
Permission Requirements (Important)
⚠️ 日历功能需要在飞书开放平台为应用开通以下权限之一:
- - 只读权限
calendar:calendar:readonly - - 读写权限
calendar:calendar - - 日历只读
calendar:calendar.calendar:readonly - - 日历读取
calendar:calendar:read
申请链接:在飞书开放平台应用后台 → 权限管理 → 申请对应权限
如果遇到 错误,请检查应用权限配置。
Access denied⚠️ The calendar function requires the app to have one of the following permissions enabled on the Feishu Open Platform:
- - Read-only permission
calendar:calendar:readonly - - Read-write permission
calendar:calendar - - Calendar read-only
calendar:calendar.calendar:readonly - - Calendar read
calendar:calendar:read
Application Link: In the Feishu Open Platform app backend → Permission Management → Apply for the corresponding permission
If you encounter an error, please check the app permission configuration.
Access denied