Workflow
Your deck belongs beside your code
Review a presentation change as easily as a change to a document.
A product launch usually has code, a plan and a presentation. The presentation should be reviewable alongside the other two.
To keep a presentation under version control with readable diffs, store it as text. An OPF deck is plain text: one JSON file that Git tracks like source code. Every change shows up as a line diff, and opf diff summarizes it slide by slide. A teammate can see that “Launch on Monday” changed to “Launch after the pilot” without opening two presentations side by side.
{
"slides": [
{
"title": "Launch readiness",
"bullets": ["Pilot complete", "Launch on Monday"]
}
]
}Loading preview…
Prefer Markdown or YAML? Write the deck in either one and convert it to the same canonical JSON.
opf convert notes.md update.opf.json
opf validate update.opf.jsonWhy a .pptx file does not diff
A .pptx file is a zip archive of XML parts. Git stores it, but git diff can only say Binary files a/deck.pptx and b/deck.pptx differ. Reviewing a change means opening both versions and comparing them by eye. When two people edit the same file, nothing merges their work; one of them redoes it.
A worked example
These commands ran with OPF CLI 0.29.1, in a project set up as in the first local run. The deck is the one above, committed as launch.opf.json.
1. See the change in Git. Change one bullet and ask Git what changed:
git diff launch.opf.json@@ -2,7 +2,7 @@
"slides": [
{
"title": "Launch readiness",
- "bullets": ["Pilot complete", "Launch on Monday"]
+ "bullets": ["Pilot complete", "Launch after the pilot"]
}
]
}2. See it as a deck change. opf diff reads both versions as decks, matches slides by id or by content, and names the field that changed:
git show HEAD:launch.opf.json > before.opf.json
opf diff before.opf.json launch.opf.json1 change (slides: 1 modified)
Slides
~ slide #1 "Launch readiness" (matched by content)
~ bullets[1] "Launch on Monday" -> "Launch after the pilot"Add --format patch to get the same change as a JSON Patch, which a script or an agent can apply with opf edit. Add --exit-code to exit 1 when the decks differ.
3. Merge two edits. One person retitles the slide while another changes the bullet. opf merge takes the common base and both versions and combines the changes:
opf merge base.opf.json ours.opf.json theirs.opf.json merged.opf.jsonThe merged deck has the new title and the new bullet. If both sides change the same value, say “Launch on Tuesday” against “Launch after the pilot”, the merge writes nothing, exits 1 and lists the conflict with the base value and both edits. Pass --prefer ours or --prefer theirs to take a side; the conflict is still reported.
4. Keep the diffs small. Two tools can save the same deck with different key order or spacing, which makes noisy diffs. opf format rewrites a deck in canonical key order and layout:
opf format -i launch.opf.json
opf format --check decks/*.opf.json--check writes nothing and exits 1 when any file would change, so it works as a gate.
A check before merge
The same commands make a pre-merge check for a folder of decks:
opf format --check decks/*.opf.json
opf validate decks/*.opf.json --fail-on warning --format githubopf validate exits 1 while any error or warning is left. With --format github each finding prints as a GitHub Actions annotation, such as ::error file=deck.opf.json,line=6,col=27,title=opf/schema::..., so it appears on the changed line of the pull request.
Why it matters: reviews get clearer, history stays recoverable, and the “final-v7” files go away. Git tracks the source, so preview the slides to check how they look.
Questions
Can Git diff a PowerPoint file?
Not in a readable way. A .pptx is a zip archive, so Git reports a binary change and nothing more. Keep the OPF file in Git and export the PowerPoint file when someone needs it: opf convert launch.opf.json launch.pptx.
Should the exported .pptx be committed too?
Treat it like a build output: regenerate it from the source instead of editing it. If someone does edit the PowerPoint file, opf convert deck.pptx deck.opf.json imports it back. The import is not lossless, and its report lists what it could not keep.
What if the team prefers Markdown?
Write OPF Markdown or YAML and convert it to the canonical JSON; both convert back. opf validate reads the Markdown and YAML forms directly, so the check above works on whichever form the team commits.
Markdown authoring · YAML authoring · CLI guide · Patch, diff, merge and format
Download the complete example. All names and figures in these examples are illustrative.