Generated: 2026-03-29
Scope: man deckuse draft, compact layout, Git-inspired workflow, no diff in phase 1.
deckuse β headless, file-native structural operations for PPTX decks
deckuse <command> [options]DeckUse is a local-first structural editing engine for PPTX files. Phase 1 uses a Git-inspired workflow around a local unpacked working directory. A PPTX must first be unpacked with deckuse init; all write commands require an initialized workspace; some read commands can read a raw .pptx directly, while structural read/query commands require initialization. Phase 1 safety boundary:
- do not add, remove, or rewrite rel relationships by default
- do not add new media parts
- do not create or delete slides by default
- do not rewrite package topology except during init/build
- prefer edits to existing XML nodes, text runs, transforms, and style properties
Unpack a .pptx into a DeckUse workspace.
deckuse init company_deck.pptx
deckuse init company_deck.pptx --dir ./company_deck.deckBehavior:
- unzips PPTX into a working directory
- builds indexes for slides, shapes, text, and selectors
- creates DeckUse metadata for command execution
- marks the workspace as editable
Typical layout:
company_deck.deck/
.deckuse/
[Content_Types].xml
_rels/
docProps/
ppt/
Show workspace status.
deckuse status ./company_deck.deckOutputs:
- initialized / not initialized
- source file if known
- workspace health
- whether workspace has unbuilt changes
- last validation status
Build the workspace back into a .pptx.
deckuse commit ./company_deck.deck
deckuse commit ./company_deck.deck --output out.pptxBehavior:
- validates workspace structure
- rebuilds ZIP package
- emits a PPTX file
- does not imply Git-style diff/history in phase 1
Validate workspace or PPTX package.
deckuse validate company_deck.pptx
deckuse validate ./company_deck.deckRun heuristic checks against a workspace or PPTX package.
deckuse doctor company_deck.pptx
deckuse doctor ./company_deck.deckAllowed for:
inspectvalidatedoctor- limited top-level metadata reads
Example:
deckuse inspect company_deck.pptxRequired for:
- structural read commands such as
list,show,tree,get,find,query,stats - all write commands
- all S2 commands
Example:
deckuse init company_deck.pptx
deckuse list slides ./company_deck.deck
deckuse set text ./company_deck.deck "slide:3/title" "2026 Strategy"
deckuse commit ./company_deck.deck --output company_deck_out.pptxRead commands never modify content. Commands marked [workspace] require deckuse init.
Print a deck-level summary.
deckuse inspect <file.pptx>
deckuse inspect <workspace.dir>Returns:
- slide count
- per-slide shape counts
- notes/images/charts/tables presence
- layouts and masters in use
- font/color summary
- possible anomalies
Show workspace state.
deckuse status <workspace.dir>List structural entities.
deckuse list slides <workspace.dir>
deckuse list layouts <workspace.dir>
deckuse list masters <workspace.dir>
deckuse list themes <workspace.dir>
deckuse list shapes <workspace.dir> --slide 3Returns:
- slides: index, slide id, inferred title, layout, shape count, notes presence
- layouts: layout id, name, slides using it
- masters: master ids, names, associated layouts
- themes: theme part, color set, font scheme
- shapes: shape id, name, type, x/y/w/h, z-order, text preview
Show structured details for a slide or shape.
deckuse show slide <workspace.dir> <slide>
deckuse show shape <workspace.dir> <selector>Outputs:
- slide: layout, title, shape summary, image summary, text summary, style summary
- shape: object identity, type, geometry, fill/line/text style, text, image crop/transform
Print the object tree for a slide.
deckuse tree slide <workspace.dir> <slide>Read object properties.
deckuse get text <workspace.dir> <selector>
deckuse get runs <workspace.dir> <selector>
deckuse get paragraphs <workspace.dir> <selector>
deckuse get style <workspace.dir> <selector>
deckuse get fill <workspace.dir> <selector>
deckuse get line <workspace.dir> <selector>
deckuse get image-props <workspace.dir> <selector>
deckuse get bbox <workspace.dir> <selector>Returns:
text: plain textruns: paragraph/run breakdown with run-level styleparagraphs: alignment, indent, bullets, spacingstyle: consolidated style summaryfill: fill type and colorline: stroke color, width, dashimage-props: embed id, frame box, crop, rotation, flipbbox: geometry
Search content and structure.
deckuse find text <workspace.dir> "Revenue"
deckuse find shapes <workspace.dir> --type picture
deckuse find styles <workspace.dir> --font Aptos
deckuse find styles <workspace.dir> --color "#4472C4"Resolve a selector expression.
deckuse query <workspace.dir> "slide[3].shape[type=textbox]"
deckuse query <workspace.dir> "text[contains('Revenue')]"Compute deck-wide statistics.
deckuse stats <workspace.dir>Returns:
- font frequency
- color frequency
- text box count
- image count
- shape type distribution
- total text size
Validate workspace or PPTX package.
deckuse validate <file.pptx>
deckuse validate <workspace.dir>Run heuristic checks.
deckuse doctor <file.pptx>
deckuse doctor <workspace.dir>Flags:
- empty text boxes
- tiny fonts
- overlap risk
- out-of-bounds objects
- heavy theme overrides
All write commands require a workspace created by deckuse init. They operate only on unpacked content and are materialized into a final .pptx with deckuse commit.
S0 commands are highly safe, in-place edits to existing text, paragraph formatting, and geometry.
Replace text in an existing text object.
deckuse set text <workspace.dir> <selector> "2026 Strategy"Clear text from an existing text object.
deckuse clear text <workspace.dir> <selector>Replace matching text in a workspace, slide, or selection.
deckuse replace text <workspace.dir> "2025" "2026"
deckuse replace text <workspace.dir> --slide 5 "ζ§εη" "ζ°εη"
deckuse replace text <workspace.dir> --regex "\bQ([1-4])\b" "Quarter \1"Modify text in a specific run.
deckuse set run-text <workspace.dir> <selector> --p 0 --r 2 "Updated"deckuse set font-family <workspace.dir> <selector> "Aptos"deckuse set font-size <workspace.dir> <selector> 20deckuse set font-color <workspace.dir> <selector> "#1F4E79"deckuse set bold <workspace.dir> <selector> on|offdeckuse set italic <workspace.dir> <selector> on|offdeckuse set underline <workspace.dir> <selector> on|offdeckuse set paragraph-align <workspace.dir> <selector> left|center|right|justifydeckuse set bullet <workspace.dir> <selector> on|offdeckuse set indent <workspace.dir> <selector> <value>deckuse set line-spacing <workspace.dir> <selector> <value>Move an existing shape by delta.
deckuse move <workspace.dir> <selector> --dx <x> --dy <y>Set absolute position for an existing shape.
deckuse set position <workspace.dir> <selector> --x <x> --y <y>Resize an existing shape.
deckuse resize <workspace.dir> <selector> --w <w> --h <h>Rotate an existing shape.
deckuse rotate <workspace.dir> <selector> <deg>Flip an existing shape.
deckuse flip <workspace.dir> <selector> horizontal|verticalS1 commands still avoid rel changes but are more sensitive to rendering, layout, and style details.
deckuse set fill-color <workspace.dir> <selector> "#D9EAF7"deckuse set fill-transparency <workspace.dir> <selector> <value>deckuse set line-color <workspace.dir> <selector> "#5B9BD5"deckuse set line-width <workspace.dir> <selector> <value>deckuse set line-dash <workspace.dir> <selector> <style>deckuse set hidden
deckuse set hidden <workspace.dir> <selector> on|offdeckuse bring-forward <workspace.dir> <selector>deckuse send-backward <workspace.dir> <selector>deckuse bring-to-front <workspace.dir> <selector>deckuse send-to-back <workspace.dir> <selector>Update crop values on an existing picture shape without replacing the underlying media part.
deckuse crop <workspace.dir> <selector> --left <v> --right <v> --top <v> --bottom <v>Update the displayed frame of an existing image.
deckuse set image-frame <workspace.dir> <selector> --x <x> --y <y> --w <w> --h <h>deckuse set alt-text <workspace.dir> <selector> "ε’ιεδ½εΊζ―"Update notes text for a slide that already has a notes part.
deckuse set notes <workspace.dir> <slide> "Presenter notes"S2 commands may theoretically avoid rel modifications, but can still affect compatibility, rendering consistency, or downstream editability. All S2 commands require:
- initialized workspace
- preflight validation
- explicit
--confirm - recommended backup before commit
Remove an existing shape from a slide tree.
deckuse delete shape <workspace.dir> <selector> --confirmRisks:
- placeholder integrity
- layout expectations
- animation references
- future editability in PowerPoint
Replace bytes in an existing media file without changing rel bindings.
deckuse overwrite media <workspace.dir> <selector> <new-file> --confirmRisks:
- image format mismatch
- dimension mismatch
- decoder support differences
- compression issues
Rewrite or normalize local style nodes for an existing object.
deckuse rewrite style <workspace.dir> <selector> --confirmRisks:
- theme fallback behavior
- Office compatibility
- unexpected visual changes
Rewrite text body structure while preserving visible content.
deckuse normalize text-body <workspace.dir> <selector> --confirmRisks:
- run segmentation changes
- paragraph default changes
- editing behavior in PowerPoint
- copy/paste fidelity
Rebuild selected shape property nodes.
deckuse reset shape-properties <workspace.dir> <selector> --confirmRisks:
- fallback defaults
- rendering changes in older Office versions
- style inheritance changes
Remove local styling in favor of inherited defaults.
deckuse remove local-overrides <workspace.dir> <selector> --confirmRisks:
- significant appearance changes depending on theme/layout inheritance
Apply destructive text fitting or scaling changes.
deckuse hard-fit-text <workspace.dir> <selector> --confirmRisks:
- unreadable text
- unexpected line breaks
- editor-specific rendering changes
Rewrite nested transform/layout structure for existing objects.
deckuse flatten group-like-structure <workspace.dir> <selector> --confirmRisks:
- coordinate system changes
- reduced editability
- rendering inconsistency
- Read: no file changes
- S0: highly safe in-place edits to existing text, transforms, and simple formatting
- S1: still avoids rel changes, but may influence rendering, layout, or style detail
- S2: explicit human confirmation required; may avoid rel edits while still causing compatibility or rendering side effects
For phase 1:
- enable
init,status,commit,inspect,validate,doctor - enable all S0 commands by default
- enable S1 commands with validation and preview
- gate all S2 commands behind confirmation and backup guidance
- do not expose diff/history yet
Core:
init
status
commit
inspect
validate
doctor
Read (workspace):
list slides|layouts|masters|themes|shapes
show slide|shape
tree slide
get text|runs|paragraphs|style|fill|line|image-props|bbox
find text|shapes|styles
query
stats
S0:
set text
clear text
replace text
set run-text
set font-family
set font-size
set font-color
set bold
set italic
set underline
set paragraph-align
set bullet
set indent
set line-spacing
move
set position
resize
rotate
flip
S1:
set fill-color
set fill-transparency
set line-color
set line-width
set line-dash
set hidden
bring-forward
send-backward
bring-to-front
send-to-back
crop
set image-frame
set alt-text
set notes
S2:
delete shape
overwrite media
rewrite style
normalize text-body
reset shape-properties
remove local-overrides
hard-fit-text
flatten group-like-structure
deckuse init company_deck.pptx --dir ./company_deck.deck
deckuse status ./company_deck.deck
deckuse list slides ./company_deck.deck
deckuse set text ./company_deck.deck "slide:3/title" "2026 Strategy"
deckuse validate ./company_deck.deck
deckuse commit ./company_deck.deck --output company_deck_out.pptx