npx skills add https://github.com/steipete/clawdis --skill gog使用 gog 管理 Gmail/日历/云端硬盘/通讯录/表格/文档。需要 OAuth 设置。
设置(一次性)
gog auth credentials /path/to/client_secret.jsongog auth add you@gmail.com --services gmail,calendar,drive,contacts,docs,sheetsgog auth list常用命令
gog gmail search 'newer_than:7d' --max 10gog gmail messages search "in:inbox from:ryanair.com" --max 20 --account you@example.comgog gmail send --to a@b.com --subject "Hi" --body "Hello"广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
gog gmail send --to a@b.com --subject "Hi" --body-file ./message.txtgog gmail send --to a@b.com --subject "Hi" --body-file -gog gmail send --to a@b.com --subject "Hi" --body-html "<p>Hello</p>"gog gmail drafts create --to a@b.com --subject "Hi" --body-file ./message.txtgog gmail drafts send <draftId>gog gmail send --to a@b.com --subject "Re: Hi" --body "Reply" --reply-to-message-id <msgId>gog calendar events <calendarId> --from <iso> --to <iso>gog calendar create <calendarId> --summary "Title" --from <iso> --to <iso>gog calendar create <calendarId> --summary "Title" --from <iso> --to <iso> --event-color 7gog calendar update <calendarId> <eventId> --summary "New Title" --event-color 4gog calendar colorsgog drive search "query" --max 10gog contacts list --max 20gog sheets get <sheetId> "Tab!A1:D10" --jsongog sheets update <sheetId> "Tab!A1:B2" --values-json '[["A","B"],["1","2"]]' --input USER_ENTEREDgog sheets append <sheetId> "Tab!A:C" --values-json '[["x","y","z"]]' --insert INSERT_ROWSgog sheets clear <sheetId> "Tab!A2:Z"gog sheets metadata <sheetId> --jsongog docs export <docId> --format txt --out /tmp/doc.txtgog docs cat <docId>日历颜色
gog calendar colors 查看所有可用的事件颜色(ID 1-11)--event-color <id> 标志为事件添加颜色gog calendar colors 输出):
邮件格式
首选纯文本。对于多段落消息,请使用 --body-file(或使用 --body-file - 从标准输入读取)。
相同的 --body-file 模式也适用于草稿和回复。
--body 不会转义 \n。如果需要内联换行,请使用 heredoc 或 $'Line 1\n\nLine 2'。
仅在需要富文本格式时使用 --body-html。
HTML 标签:<p> 用于段落,<br> 用于换行,<strong> 用于加粗,<em> 用于斜体,<a href="url"> 用于链接,<ul>/<li> 用于列表。
示例(通过标准输入的纯文本):
gog gmail send --to recipient@example.com \
--subject "Meeting Follow-up" \
--body-file - <<'EOF'
Hi Name,
Thanks for meeting today. Next steps:
- Item one
- Item two
Best regards,
Your Name
EOF
示例(HTML 列表):
gog gmail send --to recipient@example.com \
--subject "Meeting Follow-up" \
--body-html "<p>Hi Name,</p><p>Thanks for meeting today. Here are the next steps:</p><ul><li>Item one</li><li>Item two</li></ul><p>Best regards,<br>Your Name</p>"
注意事项
GOG_ACCOUNT=you@gmail.com 以避免重复使用 --account。--json 加上 --no-input。--values-json 传递(推荐)或作为内联行传递。gog gmail search 每个线程返回一行;当需要单独返回每封邮件时,请使用 gog gmail messages search。每周安装量
1.7K
仓库
GitHub 星标数
337.4K
首次出现
2026年1月22日
安全审计
安装于
codex1.6K
opencode1.6K
gemini-cli1.5K
github-copilot1.5K
kimi-cli1.5K
amp1.5K
Use gog for Gmail/Calendar/Drive/Contacts/Sheets/Docs. Requires OAuth setup.
Setup (once)
gog auth credentials /path/to/client_secret.jsongog auth add you@gmail.com --services gmail,calendar,drive,contacts,docs,sheetsgog auth listCommon commands
gog gmail search 'newer_than:7d' --max 10gog gmail messages search "in:inbox from:ryanair.com" --max 20 --account you@example.comgog gmail send --to a@b.com --subject "Hi" --body "Hello"gog gmail send --to a@b.com --subject "Hi" --body-file ./message.txtgog gmail send --to a@b.com --subject "Hi" --body-file -gog gmail send --to a@b.com --subject "Hi" --body-html "<p>Hello</p>"gog gmail drafts create --to a@b.com --subject "Hi" --body-file ./message.txtgog gmail drafts send <draftId>gog gmail send --to a@b.com --subject "Re: Hi" --body "Reply" --reply-to-message-id <msgId>gog calendar events <calendarId> --from <iso> --to <iso>gog calendar create <calendarId> --summary "Title" --from <iso> --to <iso>gog calendar create <calendarId> --summary "Title" --from <iso> --to <iso> --event-color 7gog calendar update <calendarId> <eventId> --summary "New Title" --event-color 4gog calendar colorsgog drive search "query" --max 10gog contacts list --max 20gog sheets get <sheetId> "Tab!A1:D10" --jsongog sheets update <sheetId> "Tab!A1:B2" --values-json '[["A","B"],["1","2"]]' --input USER_ENTEREDgog sheets append <sheetId> "Tab!A:C" --values-json '[["x","y","z"]]' --insert INSERT_ROWSgog sheets clear <sheetId> "Tab!A2:Z"gog sheets metadata <sheetId> --jsongog docs export <docId> --format txt --out /tmp/doc.txtgog docs cat <docId>Calendar Colors
gog calendar colors to see all available event colors (IDs 1-11)--event-color <id> flaggog calendar colors output):
Email Formatting
Prefer plain text. Use --body-file for multi-paragraph messages (or --body-file - for stdin).
Same --body-file pattern works for drafts and replies.
--body does not unescape \n. If you need inline newlines, use a heredoc or $'Line 1\n\nLine 2'.
Use --body-html only when you need rich formatting.
HTML tags: <p> for paragraphs, <br> for line breaks, for bold, for italic, for links, / for lists.
Notes
GOG_ACCOUNT=you@gmail.com to avoid repeating --account.--json plus --no-input.--values-json (recommended) or as inline rows.gog gmail search returns one row per thread; use gog gmail messages search when you need every individual email returned separately.Weekly Installs
1.7K
Repository
GitHub Stars
337.4K
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
codex1.6K
opencode1.6K
gemini-cli1.5K
github-copilot1.5K
kimi-cli1.5K
amp1.5K
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装
<strong><em><a href="url"><ul><li>Example (plain text via stdin):
gog gmail send --to recipient@example.com \
--subject "Meeting Follow-up" \
--body-file - <<'EOF'
Hi Name,
Thanks for meeting today. Next steps:
- Item one
- Item two
Best regards,
Your Name
EOF
Example (HTML list):
gog gmail send --to recipient@example.com \
--subject "Meeting Follow-up" \
--body-html "<p>Hi Name,</p><p>Thanks for meeting today. Here are the next steps:</p><ul><li>Item one</li><li>Item two</li></ul><p>Best regards,<br>Your Name</p>"