Operate Google Slides with the gog CLI.
Execution path: gog
Authenticated account: (account authenticated with gog)
Execution Notes
execWhen executing with the tool,timeout: 60specify- Presentation ID is URL
https://docs.google.com/presentation/d/<presentationId>/editcan be obtained from
Command Reference
Create presentation
gog slides create "<title>"
gog slides create "<title>" --parent "<folderId>" # 特定フォルダに作成
gog slides create "<title>" --template "<templateId>" # テンプレートからコピー作成
Create slides from Markdown
gog slides create-from-markdown "<title>" --content "# Slide 1\n\nContent"
gog slides create-from-markdown "<title>" --content-file "./slides.md"
gog slides create-from-markdown "<title>" --content-file "./slides.md" --parent "<folderId>"
Get presentation information
gog slides info <presentationId>
gog slides info <presentationId> --json
Copy Presentation
gog slides copy <presentationId> "コピーのタイトル"
gog slides copy <presentationId> "コピーのタイトル" --parent "<folderId>"
Export (Download)
gog slides export <presentationId> # PPTX(デフォルト)
gog slides export <presentationId> --format pdf # PDF形式
gog slides export <presentationId> --format pdf --out "./deck.pdf" # 出力先指定
gog slides export <presentationId> --format pptx --out "./deck.pptx"
List slides
gog slides list-slides <presentationId>
gog slides list-slides <presentationId> --json
Read slide content
gog slides read-slide <presentationId> <slideId>
gog slides read-slide <presentationId> <slideId> --json
Returns notes, text elements, and image information. slideId is list-slides obtained with.
Add image slide
gog slides add-slide <presentationId> ./image.png
gog slides add-slide <presentationId> ./image.png --notes "説明テキスト"
gog slides add-slide <presentationId> ./image.png --notes-file "./notes.txt"
gog slides add-slide <presentationId> ./image.png --before <slideId> # 指定スライドの前に挿入
Add a full-bleed image slide.--before If omitted, it is added at the end.
Delete slide
gog slides delete-slide <presentationId> <slideId>
Update speaker notes
gog slides update-notes <presentationId> <slideId> --notes "新しいノート"
gog slides update-notes <presentationId> <slideId> --notes-file "./notes.txt"
gog slides update-notes <presentationId> <slideId> --notes "" # ノートをクリア
Replace image
gog slides replace-slide <presentationId> <slideId> ./new-image.png
gog slides replace-slide <presentationId> <slideId> ./new-image.png --notes "更新ノート"
gog slides replace-slide <presentationId> <slideId> ./new-image.png --notes-file "./notes.txt"
gog slides replace-slide <presentationId> <slideId> ./new-image.png --notes "" # ノートをクリア
Replace the image of an existing slide in place.--notes If omitted, existing notes are preserved.
Output options
| Options | Description |
|---|---|
--json / -j |
JSON output |
--plain / -p |
TSV output (for parsing) |
--results-only |
For JSON, output only the result |
--select "field1,field2" |
For JSON, filter fields |
--dry-run / -n |
Show intent without making changes |
Typical workflow
Create slides from Markdown
# 1. Markdownファイルを用意(---でスライド区切り、#でタイトル)
cat > /tmp/slides.md << 'EOF'
# プロジェクト概要
目的と背景の説明
---
# スケジュール
- Phase 1: 設計(2月)
- Phase 2: 開発(3-4月)
- Phase 3: テスト(5月)
---
# まとめ
次のステップと担当者
EOF
# 2. スライド作成
gog slides create-from-markdown "プロジェクト報告" --content-file /tmp/slides.md --json
Create image deck
# 1. 空のプレゼンテーション作成
gog slides create "写真アルバム" --json
# → presentationId を取得
# 2. 画像スライドを順次追加
gog slides add-slide <presentationId> ./photo1.png --notes "東京タワー"
gog slides add-slide <presentationId> ./photo2.png --notes "富士山"
gog slides add-slide <presentationId> ./photo3.png --notes "京都"
# 3. PDF出力
gog slides export <presentationId> --format pdf --out "./album.pdf"
Check and edit slide content
# 1. スライド一覧を取得
gog slides list-slides <presentationId> --json
# 2. 特定スライドの内容を読む
gog slides read-slide <presentationId> <slideId>
# 3. ノートを更新
gog slides update-notes <presentationId> <slideId> --notes "修正したノート"
# 4. 画像を差し替え
gog slides replace-slide <presentationId> <slideId> ./updated-image.png
Create presentation from a template
# 1. テンプレートをコピー
gog slides copy <templateId> "Q1レビュー 2026" --json
# 2. スライド一覧で構造確認
gog slides list-slides <newPresentationId>
# 3. 必要に応じてスライド追加・削除
gog slides add-slide <newPresentationId> ./chart.png --notes "売上グラフ"
gog slides delete-slide <newPresentationId> <unwantedSlideId>
Export
# PDF出力
gog slides export <presentationId> --format pdf --out "./presentation.pdf"
# PPTX出力
gog slides export <presentationId> --format pptx --out "./presentation.pptx"
Notes
- List presentations:
gog slideshas no list command. Search via Drive:gog drive ls --query "mimeType='application/vnd.google-apps.presentation'" - Get slideId:
list-slidesCheck the object ID of each slide with, then operate - Image formats: add-slide / replace-slide accept local PNG/JPG/GIF files
- Preserving notes: replace-slide で
--notesIf omitted, existing notes are preserved. To clear, specify--notes ""specify - export defaults: Format is PPTX. If PDF is needed,
--format pdfspecify explicitly - create-from-markdown:
--content(inline) or--content-file(file) is required - Destructive operations: delete-slide shows a confirmation prompt.
-ycan be skipped with