Community코딩 & 개발github.com

gog

Google Workspace CLI로 Gmail, 캘린더, 드라이브, 연락처, 시트, 문서를 제어합니다.

gog란 무엇인가요?

**gog**는 Google Workspace 서비스(Gmail, 캘린더, 드라이브, 연락처, 시트, 문서)를 명령줄에서 손쉽게 사용할 수 있게 해주는 CLI 도구입니다. OAuth 인증을 통해 사용자를 대신해 API 호출을 수행하며, 메일 검색/보내기, 캘린더 일정 관리, 드라이브 파일 검색, 연락처 조회, 시트 데이터 읽기/쓰기 등 다양한 작업을 지원합니다. 헤드리스(Headless) 환경이나 원격 게이트웨이 호스트에서도 사용할 수 있도록 인증 콜백 전달 방식과 파일 기반 키링 설정을 제공하여, 비대화형 스크립트나 AI 에이전트와의 통합에 적합합니다. 또한 자세한 진단 명령어(`gog auth list --check`, `gog auth doctor`)를 제공하여 토큰 유효성을 확인할 수 있습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/skills/gog

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

gog은(는) 무엇을 하나요?

gog를 사용하여 Gmail/캘린더/드라이브/연락처/시트/문서를 제어하세요. OAuth 설정이 필요합니다.

이미 인증된 호스트 계정을 선호합니다: 먼저 요청된 gog 명령을 실행하세요. 인증 오류가 발생한 후에만 설정을 진행하세요. 채팅에서 비밀번호, 클라이언트 시크릿, 리프레시 토큰을 묻지 마십시오.

설정 (한 번만)

  • gog auth credentials /path/to/client_secret.json
  • gog auth add [email protected] --services gmail,calendar,drive,contacts,docs,sheets
  • gog auth list

원격 / 헤드리스 게이트웨이 호스트

게이트웨이 호스트에 로컬 브라우저 디스플레이가 없는 경우:

  1. 게이트웨이 호스트에서 실시간 콜백 리스너를 선호합니다. 브라우저가 있는 머신에서 정확한 콜백 포트를 전달(ssh -L <port>:127.0.0.1:<port> user@gateway-host)하고, gog가 출력하는 승인 URL을 연 다음 리디렉션이 해당 포워딩된 포트에서 완료되도록 하세요.
  2. 실시간 리스너를 사용할 수 없는 경우, 운영자는 신뢰할 수 있는 게이트웨이 셸에서 하나의 붙여넣기 모드 경로를 선택합니다. 콜백 URL은 채팅이나 에이전트 도구 입력에 절대 입력되어서는 안 됩니다:
    • --manual: 운영자가 전체 리디렉션 URL을 gog의 대화형 프롬프트에 붙여넣습니다.
    • --remote --step 1: auth_url(및 state_reused)을 출력하고 종료합니다. 브라우저 동의 후 운영자는 신뢰할 수 있는 셸에서 --remote --step 2 --auth-url <callback-url>을 실행합니다. 동의 후 로컬호스트 페이지 로드 실패는 정상입니다.
  3. 원격 단계에서 동일한 해결된 구성 컨텍스트를 유지합니다: GOG_CONFIG_DIR이 --home보다 우선하고, --home이 GOG_HOME보다 우선합니다. 또한 --client, 서비스/스코프, 리디렉션 URI 및 동의 옵션을 유지하세요. 일치하는 만료되지 않은 수동 상태를 재사용할 수 있습니다(state_reused=true).
  4. 데스크톱 키링을 사용할 수 없는 경우 파일 백엔드를 구성하고(gog auth keyring file) 게이트웨이 환경에 GOG_KEYRING_PASSWORD를 설정하여 비대화형 에이전트/--no-input 실행이 토큰을 읽을 수 있도록 하세요. gog auth doctor는 비밀번호가 누락된 경우 보고합니다.
  5. 콜백 수신은 토큰 저장과 동일하지 않습니다. 프록시 뒤에서 토큰 교환 또는 ID 조회가 실패하면 운영자가 필요한 Google 엔드포인트에 대한 범위가 제한된 송신 또는 프록시 예외를 승인한 후 1단계부터 다시 시작하세요. 호스트 네트워크 정책을 우회하거나 실패했거나 만료된 상태를 재사용하지 마십시오.

진단을 위해 gog auth list --check가 보고하는 모든 항목을 검사하십시오. 종료 상태는 저장된 모든 토큰이 유효함을 증명하지 않습니다. 마찬가지로 gog auth doctor가 보고하는 상태를 종료 코드에만 의존하지 말고 검사하십시오.

일반 명령어

  • Gmail 검색: gog gmail search 'newer_than:7d' --max 10
  • Gmail 메시지 검색(이메일별, 스레딩 무시): gog gmail messages search "in:inbox from:ryanair.com" --max 20 --account [email protected]
  • Gmail 보내기(일반): gog gmail send --to [email protected] --subject "안녕하세요" --body "안녕"
  • Gmail 보내기(여러 줄): gog gmail send --to [email protected] --subject "안녕하세요" --body-file ./message.txt
  • Gmail 보내기(stdin): gog gmail send --to [email protected] --subject "안녕하세요" --body-file -
  • Gmail 보내기(HTML): gog gmail send --to [email protected] --subject "안녕하세요" --body-html "<p>안녕</p>"
  • Gmail 임시보관: gog gmail drafts create --to [email protected] --subject "안녕하세요" --body-file ./message.txt
  • Gmail 임시보관 보내기: gog gmail drafts send <draftId>
  • Gmail 답장: gog gmail send --to [email protected] --subject "Re: 안녕하세요" --body "답장" --reply-to-message-id <msgId>
  • 캘린더 일정 목록: gog calendar events <calendarId> --from <iso> --to <iso>
  • 캘린더 일정 만들기: gog calendar create <calendarId> --summary "제목" --from <iso> --to <iso>
  • 캘린더 색상 포함 일정 만들기: gog calendar create <calendarId> --summary "제목" --from <iso> --to <iso> --event-color 7
  • 캘린더 일정 업데이트: gog calendar update <calendarId> <eventId> --summary "새 제목" --event-color 4
  • 캘린더 색상 보기: gog calendar colors
  • 드라이브 검색: gog drive search "query" --max 10
  • 연락처: gog contacts list --max 20
  • 시트 가져오기: gog sheets get <sheetId> "Tab!A1:D10" --json
  • 시트 업데이트: gog sheets update <sheetId> "Tab!A1:B2" --values-json '[["A","B"],["1","2"]]' --input USER_ENTERED
  • 시트 추가: gog sheets append <sheetId> "Tab!A:C" --values-json '[["x","y","z"]]' --insert INSERT_ROWS
  • 시트 지우기: gog sheets clear <sheetId> "Tab!A2:Z"
  • 시트 메타데이터: gog sheets metadata <sheetId> --json
  • 문서 내보내기: gog docs export <docId> --format txt --out /tmp/doc.txt
  • 문서 보기: gog docs cat <docId>

캘린더 색상

  • gog calendar colors를 사용하여 사용 가능한 모든 일정 색상(ID 1-11)을 확인하세요.
  • --event-color <id> 플래그로 일정에 색상을 추가하세요.
  • 일정 색상 ID (gog calendar colors 출력에서):
    • 1: #a4bdfc
    • 2: #7ae7bf
    • 3: #dbadff
    • 4: #ff887c
    • 5: #fbd75b
    • 6: #ffb878
    • 7: #46d6db
    • 8: #e1e1e1
    • 9: #5484ed
    • 10: #51b749
    • 11: #dc2127

이메일 서식

  • 일반 텍스트를 선호합니다. 여러 단락 메시지에는 --body-file을 사용하세요(stdin의 경우 --body-file -).

  • 동일한 --body-file 패턴이 임시보관 및 답장에도 적용됩니다.

  • --body는 \n을 이스케이프 해제하지 않습니다. 인라인 개행이 필요한 경우 heredoc 또는 $'라인1\n\n라인2'를 사용하세요.

  • 서식이 풍부해야 하는 경우에만 --body-html을 사용하세요.

  • HTML 태그: 단락은 <p>, 줄 바꿈은 <br>, 굵게는 <strong>, 기울임은 <em>, 링크는 <a href="url">, 목록은 <ul>/<li>를 사용하세요.

  • 예시 (stdin을 통한 일반 텍스트):

    gog gmail send --to [email protected] \
      --subject "회의 후속 조치" \
      --body-file - <<'EOF'
    안녕하세요 [이름],
    
    오늘 회의 감사합니다. 다음 단계:
    - 항목 1
    - 항목 2
    
    감사합니다,
    [보내는 사람 이름]
    EOF
    
  • 예시 (HTML 목록):

    gog gmail send --to [email protected] \
      --subject "회의 후속 조치" \
      --body-html "<p>안녕하세요 [이름],</p><p>오늘 회의 감사합니다. 다음 단계는 다음과 같습니다:</p><ul><li>항목 1</li><li>항목 2</li></ul><p>감사합니다,<br>[보내는 사람 이름]</p>"
    

참고 사항

  • [email protected]을 설정하면 --account를 반복하지 않아도 됩니다.
  • 스크립팅 시 --json 및 --no-input을 선호하세요.
  • 시트 값은 --values-json(권장) 또는 인라인 행으로 전달할 수 있습니다.
  • Docs는 내보내기/보기/복사를 지원합니다. 내부 편집에는 Docs API 클라이언트(gog에 없음)가 필요합니다.
  • gog gmail search는 스레드당 한 행을 반환합니다. 모든 개별 이메일을 별도로 반환해야 하는 경우 gog gmail messages search를 사용하세요.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills when explicitly requested; install, verify, update, uninstall, publish, or sync skills.

관련 스킬