Clippy - Microsoft 365 CLI
2026-03-28
新闻来源:网淘吧
围观:25
电脑广告
手机广告
Clippy - Microsoft 365 命令行界面
源代码: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
身份验证
# Interactive login (opens browser, establishes session)
clippy login --interactive
# Check auth status
clippy whoami
保活(推荐)
保持浏览器会话活动以防止令牌过期:
# Start keepalive (keeps browser open, refreshes every 10min)
clippy keepalive --interval 10
如需持续运行,请设置为 launchd 服务(macOS)或 systemd(Linux)。
健康监控:保活功能会写入~/.config/clippy/keepalive-health.txt文件,每次成功刷新时更新。通过检查此文件是否过期(>15 分钟)来检测故障。
日历
# Today's events
clippy calendar
# Specific day
clippy calendar --day tomorrow
clippy calendar --day monday
clippy calendar --day 2024-02-15
# Week view
clippy calendar --week
# With details (description, attendees)
clippy calendar --details
创建事件
clippy create-event "Title" 09:00 10:00
# Full options
clippy create-event "Meeting" 14:00 15:00 \
--day tomorrow \
--description "Meeting notes" \
--attendees "alice@company.com,bob@company.com" \
--teams \
--find-room
# Recurring
clippy create-event "Standup" 09:00 09:15 --repeat daily
clippy create-event "Sync" 14:00 15:00 --repeat weekly --days mon,wed,fri
更新/删除事件
clippy update-event 1 --title "New Title"
clippy update-event 1 --start 10:00 --end 11:00
clippy delete-event 1
clippy delete-event 1 --message "Need to reschedule"
响应邀请
clippy respond # List pending
clippy respond accept --id <eventId>
clippy respond decline --id <eventId> --message "Conflict"
clippy respond tentative --id <eventId>
查找会议时间
clippy findtime
clippy findtime --attendees "alice@company.com,bob@company.com"
clippy findtime --duration 60 --days 5
电子邮件
# Inbox
clippy mail
clippy mail --unread
clippy mail -n 20
clippy mail --search "invoice"
# Other folders
clippy mail sent
clippy mail drafts
clippy mail archive
# Read email
clippy mail -r <number>
# Download attachments
clippy mail -d <number> -o ~/Downloads
发送邮件
clippy send \
--to "recipient@example.com" \
--subject "Subject" \
--body "Message body"
# With CC, attachments, markdown
clippy send \
--to "alice@example.com" \
--cc "manager@example.com" \
--subject "Report" \
--body "**See attached**" \
--markdown \
--attach "report.pdf"
回复/转发
clippy mail --reply <number> --message "Thanks!"
clippy mail --reply-all <number> --message "Got it"
clippy mail --forward <number> --to-addr "colleague@example.com"
邮件操作
clippy mail --mark-read <number>
clippy mail --flag <number>
clippy mail --move <number> --to archive
人员/房间搜索
clippy find "john" # People
clippy find "conference" --rooms # Rooms
JSON 输出
clippy calendar --json
clippy mail --json
配置
配置文件目录可被覆盖:
export CLIPPY_PROFILE_DIR=~/.config/clippy/my-profile
文章底部电脑广告
手机广告位-内容正文底部
上一篇:Clawdbot Logs
下一篇:Asana


微信扫一扫,打赏作者吧~