deckuse
v0.2.0
Published
Headless, file-native structural operations for PPTX decks
Maintainers
Readme
DeckUse
Headless engine for structural editing of PPTX files.
🌤️ Want to skip local setup? Use our cloud processing via https://deckflow.com
🤖 LLM Quickstart
- Point your coding agent (Cursor, Claude Code, etc.) to DeckUse docs
- Start issuing commands like:
- “replace all 2025 with 2026”
- “extract all titles”
- “move image on slide 3”
👋 Human Quickstart
1. Install DeckUse
npm install -g @deckflow/deckuse2. Initialize a workspace
deckuse init company.pptx --dir ./company.deck3. Inspect structure
deckuse list slides ./company.deck
deckuse show slide ./company.deck 3Note: Path names depend on the slide layout structure. Common paths include title, body, subtitle, footer.
2.1. Shape ID Path Selectors (for nested/grouped shapes)
Some write operations (e.g. via pptx-modifier) address shapes by an ID path: if a shape with id=9 is nested under a parent shape id=6, its ID path is 6,9.
DeckUse supports expressing this in two equivalent forms:
- Recommended (explicit, composable):
deckuse get text <workspace.dir> "slide:1/shape[id=6]/shape[id=9]"- CLI shorthand (ID path sugar):
deckuse get text <workspace.dir> "slide:1/#6,9"Both selectors mean: within slide 1, traverse the shape tree by IDs 6 → 9.
3. Filter-based Selectors
Select elements matching specific criteria using [filter] syntax:
Key-Value Filters:
shape[type=textbox] # All textbox shapes
shape[type=picture] # All picture shapes
slide[layout=Title] # All slides using Title layout
layout[path=ppt/slideLayouts/slideLayout1.xml] # Layout by pathdeckuse set text ./company.deck "slide:3/title" "2026 Strategy"Write commands and -o/--output
- If
<workspace>is a workspace directory (e.g../company.deck), write commands will modify the workspace only.-ois optional and will export a PPTX if provided. - If
<workspace>is a .pptx file path, write commands require-oand will export the modified PPTX to that path (noinitneeded).
5. Build PPTX
deckuse commit ./company.deck --output output.pptxDemos
✏️ Text Replacement
Task = “Replace all 2025 with 2026”
deckuse replace ./deck "2025" "2026"
deckuse commit ./deck -o output.pptxOr directly on a PPTX (no init, requires -o):
deckuse replace ./file.pptx "2025" "2026" -o output.pptx📊 Structure Inspection
Task = “List all slides and titles”
deckuse list slides ./deck🧩 Layout Adjustment
Task = “Move title on slide 3”
deckuse move ./deck "slide:3/title" --left 0.1 --top 0.2💻 CLI
deckuse init file.pptx
deckuse status ./deck
deckuse list slides ./deck
deckuse set text ./deck "slide:1/title" "Hello"
deckuse commit ./deckConcepts
- Workspace — unpacked PPTX directory
- Selector — query language for slides/shapes
- Command model — read / edit
- Commit — rebuild PPTX
FAQ
PPTX files are complex OOXML packages. DeckUse provides safe, structured editing without breaking relationships.
Yes for all modifications. Some commands can work directly on PPTX.
Yes, DeckUse is open source.
No. Use DeckOps Project for rendering and conversion.
Tell your deck what to do, and it updates itself.
