From jsphh-tools
使用 gogcli (gog) 指令列工具存取 Google 服務(Gmail, Calendar, Drive, Sheets 等),適用於自動化腳本與 AI Agent 資料存取。Mac 使用 ~/bin/gog;Windows 使用 gog.exe(需另行安裝)。
How this skill is triggered — by the user, by Claude, or both
Slash command
/jsphh-tools:gogcliThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
`gogcli`(指令名稱為 `gog`)是一個開源的 Google Suite CLI 工具,可透過終端機指令直接存取 Gmail、Google Calendar、Google Drive、Google Sheets 等服務。輸出為 JSON 格式,適合 AI Agent 解析與自動化流程整合。
gogcli(指令名稱為 gog)是一個開源的 Google Suite CLI 工具,可透過終端機指令直接存取 Gmail、Google Calendar、Google Drive、Google Sheets 等服務。輸出為 JSON 格式,適合 AI Agent 解析與自動化流程整合。
~/bin/goggogcli_0.11.0_windows_amd64.zip 並加入 PATH# 下載並安裝 binary(Apple Silicon M系列)
mkdir -p ~/bin
curl -L "https://github.com/steipete/gogcli/releases/download/v0.11.0/gogcli_0.11.0_darwin_arm64.tar.gz" -o /tmp/gogcli.tar.gz
tar -xzf /tmp/gogcli.tar.gz -C /tmp/
mv /tmp/gog ~/bin/gog
chmod +x ~/bin/gog
# 確保 ~/bin 在 PATH 中(加入 ~/.zprofile)
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# 驗證安裝
gog --version
gog.exe 移至 C:\Users\<YourName>\bin\gog --version 驗證首次使用前需設定 Google OAuth2 憑證:
# 初始化授權(會開啟瀏覽器進行 Google 登入)
gog auth login
# 確認授權狀態
gog auth status
詳細 OAuth2 設定步驟請參考官方文件:https://github.com/steipete/gogcli#quick-start
gog gmail list # 列出最新信件
gog gmail search "subject:ESM研究" # 搜尋信件
gog gmail send --to [email protected] --subject "主旨" --body "內容"
gog calendar list # 列出近期行程
gog calendar list --days 7 # 列出未來 7 天行程
gog calendar create --title "研究會議" --start "2026-03-01T14:00" --end "2026-03-01T15:00"
gog drive ls # 列出 Drive 根目錄
gog drive search "問卷資料" # 搜尋檔案
gog drive download <file_id> # 下載檔案
gog sheets read <spreadsheet_id> # 讀取試算表全部內容
gog sheets read <spreadsheet_id> --sheet "Sheet1" --range "A1:D100"
gog sheets write <spreadsheet_id> --range "A1" --values '[["資料1","資料2"]]'
gog tasks list # 列出所有任務
gog tasks add --title "新增任務"
所有指令加上 --json 旗標可輸出結構化 JSON,適合 AI Agent 解析:
gog calendar list --json
gog gmail list --json | jq '.[] .subject'
gog auth login --account work # 登入研究室帳號
gog auth login --account personal # 登入個人帳號
gog calendar list --account work # 用特定帳號執行指令
# Mac:重新下載最新版本(替換舊 binary)
curl -L "https://github.com/steipete/gogcli/releases/latest/download/gogcli_darwin_arm64.tar.gz" -o /tmp/gogcli.tar.gz
tar -xzf /tmp/gogcli.tar.gz -C ~/bin/ --overwrite
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub jsphh7124/jsphh-tools