Documentation

CLI reference.

14 commands, 50+ operation types, 9 chart types, structured errors, and deterministic output.

Commands

All commands follow the pattern slides <command> [options]. Run slides <command> --help for per-command details.

CommandDescription
extractExtract template contracts from a .pptx
renderRender a deck from slides.json (plan + ops)
applyApply an ops patch to an existing deck
inspectInspect deck structure as JSON
findSearch text across slides
plan-inspectInspect a slides.json document with pagination
validateRun OOXML validation
lintLint deck against design profile
qaCombined gate: validate + lint + assets
editText find-and-replace
transformTransform a slide to a different archetype
repairConservative repair pass
docsPrint runtime discovery contract
versionPrint contract version

Global flags

Available on every command:

FlagEffect
--fieldsComma-separated field mask. Only include these fields in JSON output. See Field masks.
--ndjsonEmit list outputs as newline-delimited JSON instead of arrays.
--compactStrip null and empty values from JSON output. Reduces size 30-50%.
--verbosePrint full stdout payloads. Default is quiet when writing to files.

Field masks

--fields accepts a comma-separated list of dot-separated paths. Only matching fields appear in the output. Dot notation traverses into arrays, so slides.title extracts the title from each slide object.

# top-level field
slides inspect deck.pptx --fields summary --compact

# nested scalar inside a dict
slides inspect deck.pptx --fields summary.slide_count --compact

# project specific keys from each slide (array traversal)
slides inspect deck.pptx --fields slides.slide_index,slides.title --compact --page-size 5

# double-nested: project into shapes inside slides
slides inspect deck.pptx --fields slides.slide_index,slides.shapes.kind,slides.shapes.name \
  --compact --page-size 1

Each command has an allowlist of valid fields. To discover them:

# list all field masks for all payloads
slides docs fields

# list fields for a specific payload
slides docs fields:inspect
slides docs fields:lint
slides docs fields:find

Requesting a field not in the allowlist returns a clear error with the valid options listed.

slides extract

slides extract <source.pptx> --output-dir <dir> [options]
OptionDescription
sourceTemplate or sample .pptx file (required)
--output-dirOutput directory for artifacts (required)
--base-template-outAlso write a clean base template

Writes template_layout.json, content_layout.json, archetypes.json, resolved_manifest.json, slides_manifest.json, slide_analysis.json, and optionally base_template.pptx and icons/.

See How it works: Extraction for what each artifact contains and how they feed into the build step.

slides render

slides render --slides-json @slides.json --output deck.pptx [options]
OptionDescription
--slides-jsonSlides document JSON or @file (required)
--templateTemplate PPTX path
--outputOutput PPTX path
--profileDesign profile JSON file
--icon-pack-dirCustom icon directory
--dry-runPlan operations without applying
--no-transactionDisable rollback on failure
--non-deterministicDisable deterministic ZIP save

slides apply

slides apply [input.pptx] --ops-json @ops.json --output out.pptx

Applies an OperationBatch to an existing deck (or a blank deck if input is omitted). Supports --dry-run, --profile, --icon-pack-dir, and the same transaction/determinism flags as render.

slides inspect

slides inspect deck.pptx [options]
OptionDescription
--outWrite inspect JSON to file
--summaryPrint deck summary only
--placeholders NList placeholders for slide N
--fingerprintPrint deterministic SHA-256 fingerprint
--page-size NPaginate output (N slides per page)
--page-token TContinue from page token
--page-allEmit all pages at once

slides find

slides find deck.pptx --query "pricing" [options]

Searches for text across all slides. Returns matching shapes with slide/shape UIDs for targeted edits. Supports --limit, --out, and pagination flags.

slides validate, lint, qa

# basic validation
slides validate deck.pptx

# strict validation
slides validate deck.pptx --deep --fail-on-error

# design lint
slides lint deck.pptx --profile dp.json --out lint.json --compact

# combined gate
slides qa deck.pptx --profile dp.json --out qa.json --compact

validate checks OOXML structure. lint checks against the design profile (fonts, colors, overlap, contrast). qa runs both plus asset checks. All accept --slides-json for additional context.

slides edit, transform, repair

# text replacement
slides edit deck.pptx --query "old text" --replacement "new text" \
  --slide-uid "abc123" --output deck.pptx

# archetype transform
slides transform deck.pptx --slide-uid "abc123" --to timeline \
  --output deck.pptx

# conservative repair
slides repair deck.pptx --output deck.pptx

edit targets by slide UID, shape UID, or both. transform converts a slide to a different archetype. repair applies safe fixes without changing content.

slides docs

# full markdown docs
slides docs

# machine-readable contract as JSON
slides docs json

# specific method
slides docs method:render

# specific schema
slides docs schema:slides-document
slides docs schema:operation-batch

# field mask discovery
slides docs fields
slides docs fields:inspect

Runtime schema discovery. The schemas come from the same Pydantic models that validate input, so they can't drift from the implementation. fields and fields:<payload> list the allowed --fields values for each command.

Operations reference

Operations are JSON objects in an OperationBatch. Each has an op field and type-specific parameters. All geometry values are in inches.

Content

opRequiredOptional
add_slidelayout_index (default 6), layout_name
add_textslide_index, text, left, top, width, heightfont_size (20), bold, font_name, font_color
add_imageslide_index, path, left, topwidth, height
add_tableslide_index, rows, left, top, width, heightfont_size
add_notesslide_index, text
add_mediaslide_index, path, left, top, width, heightmime_type, poster_path
replace_textslide_index, old, new
delete_slideslide_index
move_slidefrom_index, to_index

The rows parameter for add_table is a nested array: [["Header A", "Header B"], ["row1a", "row1b"]]. Allow about 0.5 inches per row for height.

Icons

opRequiredOptional
add_iconslide_index, icon_name, left, topsize (0.75), color (6-digit hex)

Icons are SVG-based vector shapes inserted as native PowerPoint objects (not images). Two built-in icons ship with agent-slides: generic_circle and generic_square.

Templates can contain additional icons. During slides extract, vector shapes found on template slides are exported to an icons/ directory. These become available to add_icon when you set icon_pack_dir in the design profile.

Name matching is case-insensitive and partial. "circle" matches generic_circle. "Target" matches icon_Target.svg from the template pack.

// place a circle icon, white fill, at position (2, 1.5)
{
  "op": "add_icon",
  "slide_index": 0,
  "icon_name": "circle",
  "left": 2.0,
  "top": 1.5,
  "size": 0.75,
  "color": "FFFFFF"
}

To see which icons are available for a given template, check the icons/ directory after extraction. The design profile's icon_pack_dir field points to this directory.

Shapes

opRequiredOptional
add_rectangleslide_index, left, top, width, height, fill_colorborder_color, border_width
add_rounded_rectangle(same as rectangle)corner_radius, borders
add_oval(same as rectangle)borders
add_line_shapeslide_index, x1, y1, x2, y2color, line_width

Charts

All chart ops require slide_index, left, top, width, height.

opData formatStyles
add_bar_chartcategories + seriesclustered, stacked, percent_stacked
add_line_chartcategories + seriesline, line_markers, stacked, stacked_markers, percent_stacked, percent_stacked_markers
add_pie_chartcategories + seriespie, exploded, pie_of_pie, bar_of_pie
add_area_chartcategories + seriesarea, stacked, percent_stacked
add_doughnut_chartcategories + seriesdoughnut, exploded
add_radar_chartcategories + seriesradar, filled, markers
add_scatter_chartseries (xy tuples)markers, line, line_no_markers, smooth, smooth_no_markers
add_bubble_chartseries (xyz tuples)bubble, bubble_3d
add_combo_chart_overlaycategories + bar_series + line_series

Series format for category charts: [["Series Name", [1.0, 2.0, 3.0]], ...]
Scatter charts: [["Name", [[x1, y1], [x2, y2]]], ...]
Bubble charts: [["Name", [[x, y, size], ...]], ...]

Chart styling

All require slide_index and chart_index.

opKey parameters
update_chart_datacategories, series
set_chart_titletext
set_chart_stylestyle_id (1-48)
set_chart_legendvisible, position, font_size, include_in_layout
set_chart_axis_titlescategory_title, value_title
set_chart_axis_optionsaxis, reverse_order, visible, font_size
set_chart_axis_scaleminimum, maximum, major_unit, number_format
set_chart_data_labelsenabled, show_value, show_category_name
set_chart_data_labels_styleposition (use snake_case: outside_end), font_size
set_chart_plot_stylevary_by_categories, gap_width, overlap, plot_area_x/y/w/h (0–1 fractions)
set_chart_series_styleseries_index, fill_color_hex
set_chart_series_line_styleseries_index, line_color_hex, line_width_pt
set_chart_secondary_axisenable, series_indices
set_line_series_markerseries_index, style, size
set_chart_series_trendlineseries_index, trend_type

Layout and placeholders

opParameters
set_slide_backgroundslide_index, color_hex
set_placeholder_textslide_index, placeholder_idx, text
set_title_subtitleslide_index, title, subtitle
set_semantic_textslide_index, role, text
set_core_propertiestitle, subject, author, keywords
set_placeholder_imageslide_index, placeholder_idx, path + crop/position
update_table_cellslide_index, table_index, row, col, text, font_size

Execution semantics

Operations execute in array order. By default, execution is transactional: if any operation fails, all prior changes are rolled back. Set --no-transaction to continue past failures.

The operation report shows what happened:

{
  "ok": true,
  "dry_run": false,
  "applied_count": 5,
  "failed_index": null,
  "events": [
    {"index": 0, "op": "add_slide", "status": "applied", "duration_ms": 12},
    {"index": 1, "op": "add_text", "status": "applied", "duration_ms": 3}
  ]
}

On failure, ok is false, failed_index points to the broken operation, and the detail field on the failed event contains a structured error.

Error format

All errors include a machine-readable code, a description, and a suggested fix:

{
  "code": "INVALID_BAR_STYLE",
  "message": "Unknown bar chart style 'invalid_style'",
  "suggested_fix": "Use one of: clustered, stacked, percent_stacked"
}

Error codes are stable across versions. Common codes:

CodeMeaning
INVALID_SLIDE_INDEXSlide index out of range
INVALID_LAYOUT_INDEXLayout index out of range
INVALID_LAYOUT_NAMELayout name not found in template
IMAGE_NOT_FOUNDImage file does not exist
INVALID_TABLEEmpty rows or inconsistent column counts
INVALID_COLOR_HEXNot a valid 6-digit hex color
INVALID_FONT_SIZEFont size outside 6-72 range
PLACEHOLDER_NOT_FOUNDPlaceholder index not found on slide
SEMANTIC_ROLE_NOT_FOUNDNo placeholder matches the role
UNKNOWN_OPERATIONUnrecognized op string

The full error code catalog is available via slides docs json.

Exit codes

CodeMeaning
0Success
2Operation batch failed
3Validation error (with --fail-on-error)
4Validation warning (with --fail-on-warning)
5Lint failed
6Edit found no matches
9QA failed

Deterministic output

By default, output is fully deterministic. Timestamps are zeroed, GUIDs are derived from content hashes, and ZIP member order is sorted. Two renders with the same input produce byte-identical output.

slides inspect --fingerprint returns a SHA-256 hash over the deterministic bytes. Use it in CI to verify that a refactor didn't change output.

Pass --non-deterministic to disable this (rarely needed).