new-slide and all element mutations support persisted Slides batches,
including references to objects created earlier in the same batch.
Create native, editable slides without rendering an image first:
gog slides new-slide <presentationId>
gog slides new-slide <presentationId> --layout TITLE_AND_BODY --index 1Without a layout flag, Google creates a blank slide. --layout accepts the
Slides predefined layouts. A presentation theme can remove or modify a
predefined layout; Google returns an error when the selected layout is not
available in the active master.
For an exact theme layout, read its object ID from slides info --json and use
--layout-id:
gog slides info <presentationId> --json
gog slides new-slide <presentationId> --layout-id <layoutId>--layout and --layout-id are mutually exclusive. --index is zero-based;
omitting it appends the slide.
Find stable slide IDs, then duplicate or reorder them:
gog slides list-slides <presentationId> --json
gog slides duplicate-slide <presentationId> <slideId>
gog slides duplicate-slide <presentationId> <slideId> --to-index 2
gog slides move-slide <presentationId> <slideId> --to-index 0Without --to-index, Google places a duplicate immediately after its source.
With --to-index, duplication and positioning happen in one batch update.
Move indexes are zero-based and refer to the presentation order before the move,
matching the Slides API. An index can range from zero through the slide count.
Use --dry-run --json to inspect the exact batch request without contacting
Google, and slides list-slides --json to verify the resulting order.
Exclude a slide from presentation mode without deleting it, or include it again:
gog slides skip-slide <presentationId> <slideId>
gog slides unskip-slide <presentationId> <slideId>hide-slide and unhide-slide are aliases for the same operations. The slide
remains in the deck and can still be edited. slides list-slides reports the
skipped state for every slide; JSON output uses the isSkipped field.
Both commands support --dry-run --json to inspect the
updateSlideProperties request before contacting Google.
Create editable shapes and lines on an existing slide:
gog slides element create-shape <presentationId> <slideId> \
--type ROUND_RECTANGLE --x 24 --y 24 --width 180 --height 80
gog slides element create-line <presentationId> <slideId> \
--category STRAIGHT --x 50 --y 150 --width 240 --height 40Geometry defaults to points; pass --unit EMU for English Metric Units.
Supplying --object-id makes later scripted mutations deterministic. Custom
object IDs must use the Slides API's 5-50 character object-ID format.
Move, resize, shear, or rotate an element with an affine transform:
gog slides element transform <presentationId> <objectId> \
--translate-x 12 --translate-y 6
gog slides element transform <presentationId> <objectId> \
--scale-x 1.25 --scale-y 1.25
gog slides element transform <presentationId> <objectId> --rotate 15Transforms are relative by default. --apply-mode ABSOLUTE replaces the
existing transform. Rotation is around the element origin and cannot be mixed
with explicit scale or shear flags in the same request.
Style shape fills/outlines or line strokes:
gog slides element style <presentationId> <shapeId> \
--fill-color '#3367d6' --outline-color '#ffffff' --outline-weight 2
gog slides element style <presentationId> <lineId> --kind line \
--outline-color '#ea4335' --outline-dash DASHColors accept #RGB or #RRGGBB. Use --fill-transparent or
--outline-transparent to remove rendering for that property.
Stack, group, annotate, and delete elements:
gog slides element z-order <presentationId> <objectId>... --operation BRING_TO_FRONT
gog slides element group <presentationId> <objectId> <objectId>... --group-id <groupId>
gog slides element ungroup <presentationId> <groupId>...
gog slides element alt-text <presentationId> <objectId> \
--title "Chart" --description "Quarterly revenue by region"
gog slides element delete <presentationId> <objectId> --force
gog slides element delete <presentationId> <objectId1> <objectId2> --forcez-order targets must share one slide and must not be grouped. group needs at
least two ungrouped elements on one slide; Slides does not permit every element
kind to be grouped. Passing an empty --title= or --description= clears that
alt-text field. Element deletion is destructive and requires confirmation or
--force in non-interactive use. Every mutation supports --dry-run --json.
Multiple deletion targets are submitted together in one atomic API batch;
duplicate IDs are rejected before submission. A single target retains the
existing objectId JSON field; multiple targets return objectIds instead.
Text replacement does not edit WordArt text. To replace a WordArt heading,
delete its element and create a text box with the desired text.
Provide either --width or --height when inserting a local image or a public
HTTPS image. The omitted dimension follows the source aspect ratio; supplying
both keeps the explicit size override.
gog slides insert-image <presentationId> <slideId> --url https://example.com/chart.png --width 400
gog slides insert-image <presentationId> <slideId> chart.png --height 200Google Slides must be able to fetch a URL image anonymously. Automatic sizing
also needs an anonymous header fetch from the machine running gog, including
in dry-run mode. That fetch is limited to 1 MiB and 15 seconds and rejects
private or special-use network destinations. Metadata reads connect directly
and ignore proxy environment variables so destination checks cannot be bypassed.
Supply both dimensions to skip the local header fetch when the source or
network cannot support it.