html2pptx-cli
v0.4.1
Published
CLI tool to convert HTML/CSS to editable PowerPoint files via html2pptx.app
Downloads
156
Maintainers
Readme
html2pptx-cli
Convert HTML/CSS to fully editable PowerPoint files from the command line.
Powered by html2pptx.app.
Publishing boundary
The CLI is for conversion, template browsing, and local visual editing. It is not a marketplace publishing surface.
Template drafts are HTML-only and are created only through the remote MCP tool
html2pptx_publish_template, after html2pptx_validate_template_html passes.
That keeps unknown files out of generic web/CLI upload flows while still letting
agents repair policy errors before submitting an HTML draft. PPTX is not a
template publishing source.
Install
npm install -g html2pptx-cliOr use directly with npx:
npx html2pptx-cli convert slides.htmlSetup
html2pptx initThis will prompt you for your API key and save it to ~/.html2pptx/config.json.
Usage
Interactive mode
Run without arguments for a guided experience:
html2pptx convertDirect mode
Pass arguments for scripting and automation:
html2pptx convert ./slides.html -o output.pptx -s 16:9Visual edit mode
Open a local slide HTML file in the local html2pptx editor while a small
localhost bridge reads and writes the file from your current project. Start the
local editor app first; it picks an available loopback port automatically and
records it in .html2pptx/edit-slide/editor-server.json:
node scripts/dev-studio.mjsThen run:
html2pptx edit ./slides.htmlIf npm has not published the latest CLI yet, run the pinned tarball hosted by html2pptx.app:
npx --yes https://html2pptx.app/downloads/html2pptx-cli-0.4.0.tgz edit ./slides.htmlThe command opens http://localhost:<auto>/edit-slide?... using the registered
local editor URL and keeps a local 127.0.0.1:<auto> bridge running until you
press Ctrl+C. Hosted https://html2pptx.app/edit-slide is not used for local
file editing. The editor URL carries the per-session bridge token in the URL
fragment, then the editor removes that token from the address bar after startup.
Browser edits are saved back to the same HTML file with optimistic hash checks.
Editor state is stored per project under .html2pptx/edit-slide/. Running the
editor from a different project creates a separate state directory in that
project.
How it works:
html2pptx edit <file>starts a local bridge on127.0.0.1.- The local editor UI opens in your browser on the registered loopback port.
- The editor presents the one-time bridge token generated by the CLI.
- The editor reads the selected
.html/.htmfile through the bridge. - Visual changes are written back to the same local file.
- No version history, backups, or audit log are created.
The visual editor does not publish or list your deck. The HTML remains local unless an authenticated remote MCP client later creates a template draft from validated HTML.
Template publishing
The CLI publish command is disabled. HTML template drafts must be created by an
authenticated remote MCP client following the html2pptx skill's built-in
publishing workflow:
AI security preflight -> html2pptx_validate_template_html -> html2pptx_publish_template -> dashboard reviewThe CLI can still export HTML to PPTX with html2pptx convert, and it can open
local HTML in edit-slide with html2pptx edit. Those flows do not create
marketplace drafts.
Options
html2pptx convert [options] [input]
Arguments:
input Path to HTML file
Options:
-o, --output <file> Output PPTX filename
-s, --size <size> Slide size: "16:9", "4:3", or "WxH" (e.g. 1920x1080)
--css <file> External CSS file to include
--base-url <url> API base URL (default: "https://html2pptx.app")
-h, --help Display helpGet an API key
Visit html2pptx.app to create an account and get your API key.
License
MIT
