微软 365/Outlook 命令行工具,用于日历和邮件管理。适用于管理 Outlook 日历(查看、创建、更新、删除事件、寻找会议时间、回复邀请)、收发邮件及搜索组织内人员或会议室。
Clippy - Microsoft 365 CLI. 来源:https://github.com/foeken/clippy.是一项面向实际任务的技能,主要用于Works通过浏览器自动化(Playwright)的M365网络UI,而不是Graph API. 不需要Azure AD应用注册。它将相关步骤、工具调用和结果整理方式集中到统一流程中,帮助使用者更快完成目标并减少重复操作。
若输入条件不完整,应先补齐信息或采用保守配置,避免因错误假设导致结果偏离需求。执行过程中需要关注工具调用是否成功、接口或依赖是否可用、输出格式是否符合预期,并对异常提示、缺失字段和边界情况进行处理;
涉及批量任务时,还应保存进度,避免中断后重复操作。该技能适合用于一次性任务,也可以接入自动化工作流,与其他技能或上层代理配合完成更完整的业务链路;在组合使用时,应明确每一步的输入输出关系,并避免不同步骤之间出现参数冲突。
源码地址:https://github.com/foeken/clippy
通过浏览器自动化(Playwright)操作 M365 网页界面,不依赖 Graph API。无需 Azure AD 应用注册——仅需使用浏览器登录即可。
git clone https://github.com/foeken/clippy.git cd clippy && bun install bun run src/cli.ts --help
或全局链接:bun link
# 交互式登录(自动打开浏览器并建立会话) clippy login --interactive # 查看当前认证状态 clippy whoami
保持浏览器会话活跃,防止令牌过期:
# 启动保活(保持浏览器开启,每 10 分钟刷新一次) clippy keepalive --interval 10
如需长期运行,请配置为 launchd 服务(macOS)或 systemd 服务(Linux)。
健康监控:保活进程每次成功刷新后,会向 ~/.config/clippy/keepalive-health.txt 写入时间戳。若该文件超过 15 分钟未更新,即表示保活失败。
# 查看今日事件 clippy calendar # 查看指定日期的事件 clippy calendar --day tomorrow clippy calendar --day monday clippy calendar --day 2024-02-15 # 查看本周日历 clippy calendar --week # 显示详细信息(含描述、与会者) clippy calendar --details
clippy create-event "标题" 09:00 10:00 # 完整参数示例 clippy create-event "会议" 14:00 15:00 --day tomorrow --description "会议纪要" --attendees "alice@company.com,bob@company.com" --teams --find-room # 创建周期性事件 clippy create-event "每日站会" 09:00 09:15 --repeat daily clippy create-event "同步会议" 14:00 15:00 --repeat weekly --days mon,wed,fri
clippy update-event 1 --title "新标题" clippy update-event 1 --start 10:00 --end 11:00 clippy delete-event 1 clippy delete-event 1 --message "需要重新安排时间"
clippy respond # 列出待处理邀请 clippy respond accept --idclippy respond decline --id --message "时间冲突" clippy respond tentative --id
clippy findtime clippy findtime --attendees "alice@company.com,bob@company.com" clippy findtime --duration 60 --days 5
# 收件箱 clippy mail clippy mail --unread clippy mail -n 20 clippy mail --search "发票" # 其他文件夹 clippy mail sent clippy mail drafts clippy mail archive # 阅读邮件 clippy mail -r <序号> # 下载附件 clippy mail -d <序号> -o ~/Downloads
clippy send --to "recipient@example.com" --subject "主题" --body "邮件正文" # 包含抄送、附件及 Markdown 格式支持 clippy send --to "alice@example.com" --cc "manager@example.com" --subject "报告" --body "**详见附件**" --markdown --attach "report.pdf"
clippy mail --reply <序号> --message "谢谢!" clippy mail --reply-all <序号> --message "已收到" clippy mail --forward <序号> --to-addr "colleague@example.com"
clippy mail --mark-read <序号> clippy mail --flag <序号> clippy mail --move <序号> --to archive
clippy find "john" # 搜索人员 clippy find "conference" --rooms # 搜索会议室
clippy calendar --json clippy mail --json
可覆盖默认配置文件目录:
export CLIPPY_PROFILE_DIR=~/.config/clippy/my-profile