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-cliYou can also run a command without a global install:
npx @hirokisakabe/pom-cli preview slides.pom.xmlAgent editing + live preview
Keep a preview open while your coding agent edits slides.pom.xml:
pom preview slides.pom.xmlWhen 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]| Option | Description |
|---|---|
--port <number> | Listen on a port other than 3000 |
--no-open | Do not open a browser automatically |
--verbose | Print build-step timing to stderr |
build
pom build slides.pom.xml -o slides.pptx
pom build slides.pom.md -o slides.pptx --watch| Option | Description |
|---|---|
-o <output> | Required output PPTX path |
--watch | Rebuild after each input-file save |
--verbose | Print 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| Option | Description |
|---|---|
-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 |
--verbose | Print 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.pptxThe 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
- Follow the full Getting Started flow.
- Learn the shared source format in pom XML.
- Use pom-vscode when you prefer an editor-integrated preview.