CLI

pptx command-line interface

The official CLI wraps the same REST API as the TypeScript SDK. Binary name: pptx. Package: @pptx/cli on npm.

Install

Requires Node.js 20+. Global install exposes the pptx command; npx @pptx/cli works for one-off runs.

Shell
npm install -g @pptx/cli
# or
pnpm add -g @pptx/cli
# one-off
npx @pptx/cli --help
# Python-first workflows (pipx — requires Node 20+ on PATH)
pipx install pptx-cli

The PyPI package pptx-cli is a thin Python wrapper that bundles the same compiled binary and shells out to node. A Homebrew formula (dataadvantage/tap/pptx) is planned as a sibling distribution.

Quick start

Authenticate once, scaffold a minimal deck, validate it, then render when you are ready to hit the API.

Shell
pptx login
pptx add deck -o deck.opf.json
pptx validate deck.opf.json
pptx render deck.opf.json --format pptx

Commands

Run pptx [command] --help for flags and examples.

CommandWhat it does
pptx loginSave your API key to ~/.pptx/config.json (mode 0600).
pptx logoutRemove the saved API key from the config file.
pptx generate <file | prompt>Generate a deck from an OPF JSON file. Prompt-based input returns a clear "not yet supported" message until that endpoint ships.
pptx validate <file>Validate an OPF document against the canonical schema (calls the API).
pptx parse <file.pptx>Parse a .pptx file into OPF JSON.
pptx render <file> --format <fmt>Render OPF to pptx, pdf, png, or svg. Prints job metadata (for example 202 Accepted) while the generation engine rolls out.
pptx fmt <file>Normalize OPF JSON locally — no API call. Use --write (-w) to edit in place, --check to fail CI if formatting drifts.
pptx add <component>Scaffold OPF snippets offline: deck, theme, slide.title, slide.two-column, slide.chart, slide.quote.

Global options

These apply before any subcommand:

FlagPurpose
--api-key <key>Override the API key for this invocation (wins over saved config).
--base-url <url>Override the API base URL (defaults to https://api.pptx.dev).

Precedence for the key: --api-key, then PPTX_API_KEY, then values from pptx login. For the base URL: --base-url, then PPTX_API_BASE_URL, then saved config, then the default above.

Authentication

pptx login writes JSON to ~/.pptx/config.json with permissions 0600 — no OS keychain required, so the CLI stays portable. CI should set PPTX_API_KEY instead of running login.

Get a key from the API Keys page.

Exit codes

CodeMeaning
0Success
1Generic failure (API error, validation failed, fmt --check dirty)
2Bad input (missing key, invalid args, unreadable file)
3Feature not yet available (for example prompt-based generate)

License

Apache-2.0. Source and full readme live in the sdk/cli directory of the pptx-dev monorepo.