Skip to Content
pom CLIpom CLI

pom CLI

@hirokisakabe/pom-cli previews, builds, and renders .pom.xml and .pom.md files. It operates on the same pom XML model as the core library, pom-vscode, and Playground.

Install

Requires Node.js 22 or later.

npm install -g @hirokisakabe/pom-cli

You can also run a command without a global install:

npx @hirokisakabe/pom-cli preview slides.pom.xml

Agent editing + live preview

Keep a preview open while your coding agent edits slides.pom.xml:

pom preview slides.pom.xml

When the browser has no unsaved edits, it updates as the file changes. If browser edits are pending, they are preserved and the toolbar reports the external change. The agent can focus on XML edits and validation while you assess the visual result and request another iteration. For .pom.xml, the browser also offers XML / AST editing and conflict-safe Save; .pom.md remains preview-only.

This is the runtime loop used by pom-slide: prompt -> XML edit -> strict validation -> rendered review -> live preview.

preview

pom preview <input.pom.xml|input.pom.md> [options]
OptionDescription
--port <number>Listen on a port other than 3000
--no-openDo not open a browser automatically
--verbosePrint build-step timing to stderr

build

pom build slides.pom.xml -o slides.pptx pom build slides.pom.md -o slides.pptx --watch
OptionDescription
-o <output>Required output PPTX path
--watchRebuild after each input-file save
--verbosePrint build-step timing to stderr

Build uses strict diagnostics and exits non-zero for layout, image, master, or auto-fit errors. Watch mode reports an error and continues waiting for the next edit.

render

Render every slide to PNG, or choose SVG:

pom render slides.pom.xml -o ./images pom render slides.pom.xml -o ./images --format svg pom render slides.pom.xml -o ./images --slides 2,5
OptionDescription
-o <dir>Required output directory
--format <format>Output format: png or svg; default is png
--slides <numbers>Render 1-based, comma-separated slide numbers
--text-output <mode>For SVG only: path glyphs or native text with embedded fonts
--verbosePrint build-step timing to stderr

Output files are named slide-01.png, slide-02.png, and so on. Rendering uses the same pipeline as live preview and does not require LibreOffice.

theme extract

Extract pom ThemeTokens from an existing PowerPoint file:

pom theme extract brand-master.pptx

The command prints a JSON array with one entry per visible slide layout. Each entry contains text, background, primary, secondary, and accent3 through accent6. The pom-theme agent skill uses this command when onboarding a PowerPoint master.

Next steps

Last updated on