Skip to content

feat(slides): add add-slide, list-slides, and delete-slide commands#214

Merged
steipete merged 6 commits intoopenclaw:mainfrom
chrismdp:feat/slides-add-slide
Feb 13, 2026
Merged

feat(slides): add add-slide, list-slides, and delete-slide commands#214
steipete merged 6 commits intoopenclaw:mainfrom
chrismdp:feat/slides-add-slide

Conversation

@chrismdp
Copy link
Copy Markdown
Contributor

@chrismdp chrismdp commented Feb 10, 2026

Summary

Adds native Google Slides API support (presentations.batchUpdate) for building and editing slide decks programmatically:

Creating slides

  • slides add-slide <presentationId> <image> — appends a slide with a full-bleed image and optional speaker notes (--notes or --notes-file for multiline markdown)
    • --before <slideId> — insert before a specific slide instead of appending to the end
  • slides list-slides <presentationId> — lists all slides with their object IDs
  • slides delete-slide <presentationId> <slideId> — removes a slide by object ID

Editing existing slides

  • slides read-slide <presentationId> <slideId> — shows slide content: speaker notes, text elements, and image references (supports --json output)
  • slides update-notes <presentationId> <slideId> --notes/--notes-file — updates speaker notes on an existing slide in-place without deleting/re-adding
  • slides replace-slide <presentationId> <slideId> <image> — atomically swaps the image on a slide via the ReplaceImage API, optionally updating notes in the same batch (--notes or --notes-file)

Workflows

  • Build a deck: gog slides create "My Deck", then add-slide for each image, delete-slide to remove the default blank slide.
  • Edit existing slides: list-slides to get IDs, read-slide to identify content, replace-slide to swap images in-place, update-notes to fix speaker notes — no more error-prone delete+add-before dance.

Also registers ServiceSlides in the auth layer with presentations + drive scopes (including readonly support).

Changes

  • internal/googleauth/service.go — register ServiceSlides in service order, info map, and scopesForServiceWithOptions
  • internal/googleapi/slides.go — new Slides API client factory (follows sheets.go pattern)
  • internal/cmd/slides.go — add six new subcommands to SlidesCmd
  • internal/cmd/slides_add_slide.go — uploads image to Drive, creates slide + full-bleed image via batchUpdate, inserts speaker notes, cleans up temp Drive file. Supports --before <slideId> to control insertion position via InsertionIndex
  • internal/cmd/slides_list_slides.go — fetches presentation and lists slide numbers + object IDs
  • internal/cmd/slides_delete_slide.go — deletes a slide by object ID via batchUpdate
  • internal/cmd/slides_read_slide.go — fetches presentation, finds target slide, extracts speaker notes text, text elements, and image references
  • internal/cmd/slides_update_notes.go — clears existing notes and inserts new text via single batch (DeleteText + InsertText)
  • internal/cmd/slides_replace_slide.go — uploads new image to Drive, uses ReplaceImage API to swap in-place, optionally updates notes in the same batch

Note

Requires the Google Slides API to be enabled on the GCP project backing the OAuth client.

Tests

  • 22 tests total covering all six commands:
    • add-slide: no notes, with notes, notes-file precedence, JSON output, unsupported format, --before insertion, --before not found (7 tests)
    • delete-slide: success, empty ID validation (2 tests)
    • read-slide: full content, JSON output, slide not found, no notes (4 tests)
    • update-notes: inline notes, notes-file precedence, slide not found, empty notes validation (4 tests)
    • replace-slide: image only, with notes, JSON output, slide not found, no image on slide (5 tests)
  • All existing tests passing (go test ./...)

chrismdp and others added 4 commits February 9, 2026 21:08
Adds a new `gog slides add-slide <presentationId> <image>` command that
appends a slide with a full-bleed image and optional speaker notes using
the native Google Slides API (presentations.batchUpdate).

Workflow: create a deck with `gog slides create`, then add slides one at
a time with this command. Supports --notes for inline text and
--notes-file for multiline markdown speaker notes.

Also registers ServiceSlides in the auth layer with proper scopes and
readonly support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
list-slides shows all slide object IDs in a presentation.
delete-slide removes a slide by its object ID.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allow inserting a slide before a specific existing slide ID instead of
always appending to the end of the presentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds three new commands to support in-place editing of existing slides:

- `slides read-slide` — shows slide content including speaker notes,
  text elements, and image references (supports --json output)
- `slides update-notes` — updates speaker notes on an existing slide
  without deleting/re-adding (--notes or --notes-file)
- `slides replace-slide` — atomically swaps the image on an existing
  slide using the ReplaceImage API, optionally updating notes in the
  same batch operation

These eliminate the error-prone delete+add-before workflow when editing
slides in existing decks.

Closes #1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chrismdp
Copy link
Copy Markdown
Contributor Author

Resolves chrismdp#1

@steipete steipete merged commit 8b08d11 into openclaw:main Feb 13, 2026
1 check passed
@steipete
Copy link
Copy Markdown
Collaborator

Landed via temp merge-reconcile onto main.

  • Gate: make ci
  • Land commit: 607adb0650fb171b07f721f286fba31f9118f950
  • Merge commit: 8b08d11

Thanks @chrismdp!

klodr pushed a commit to klodr/gogcli that referenced this pull request Apr 22, 2026
…penclaw#214)

* feat(slides): add `slides add-slide` command for full-bleed image slides

Adds a new `gog slides add-slide <presentationId> <image>` command that
appends a slide with a full-bleed image and optional speaker notes using
the native Google Slides API (presentations.batchUpdate).

Workflow: create a deck with `gog slides create`, then add slides one at
a time with this command. Supports --notes for inline text and
--notes-file for multiline markdown speaker notes.

Also registers ServiceSlides in the auth layer with proper scopes and
readonly support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(slides): add list-slides and delete-slide commands

list-slides shows all slide object IDs in a presentation.
delete-slide removes a slide by its object ID.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(slides): add --before flag to add-slide for insertion ordering

Allow inserting a slide before a specific existing slide ID instead of
always appending to the end of the presentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(slides): add read-slide, update-notes, and replace-slide commands

Adds three new commands to support in-place editing of existing slides:

- `slides read-slide` — shows slide content including speaker notes,
  text elements, and image references (supports --json output)
- `slides update-notes` — updates speaker notes on an existing slide
  without deleting/re-adding (--notes or --notes-file)
- `slides replace-slide` — atomically swaps the image on an existing
  slide using the ReplaceImage API, optionally updating notes in the
  same batch operation

These eliminate the error-prone delete+add-before workflow when editing
slides in existing decks.

Closes chrismdp#1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(slides): rebase PR 214, clear notes semantics, and hard-fail missing placeholders (openclaw#214) (thanks @chrismdp)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants