Pick the right DeckHTML CLI output mode for your workflow. Defaults to a human-readable final result; supports machine-readable JSON for scripts, CI, and agent workflows.
DeckHTML keeps command results and diagnostics separate. Final results go to stdout. Progress, warnings, verbose logs, and errors go to stderr.
Supported inputs are stdin (-), one HTML file, multiple ordered HTML files, or a URL. Authentication is optional for local mode and required only for cloud execution or cloud-only enhancement flags.
By default, DeckHTML prints the final result on stdout.
deckhtml index.html -o deck.pptxdeck.pptx
The default success output is the generated artifact path. Progress, if shown, is written to stderr so stdout remains easy to capture.
deckhtml index.htmlindex.pptx
Choose another format with --format:
deckhtml report.html --format png -o framesframes
For PNG output, use a file, stdin, URL, or multiple ordered HTML files:
deckhtml slide-1.html slide-2.html --format png -o framesframes
URL input behaves the same way:
deckhtml https://example.com/deck.html -o deck.pptxdeck.pptx
Add --json when another program needs to parse the result.
deckhtml index.html -o deck.pptx --json{
"ok": true,
"input": ["index.html"],
"output": "deck.pptx",
"format": "pptx",
"mode": "local"
}With --json, stdout contains only JSON. Logs and diagnostics stay on stderr.
The exact JSON fields can evolve; treat the examples here as representative of the CLI result envelope, not as a formal schema.
Example stdout:
{
"ok": true,
"input": ["index.html"],
"output": "deck.pptx",
"format": "pptx",
"mode": "local"
}Example stderr when progress is enabled:
Rendering index.html
Writing deck.pptx
For stdin, the input is reported as -:
cat index.html | deckhtml - -o deck.pptx --json{
"ok": true,
"input": ["-"],
"output": "deck.pptx",
"format": "pptx",
"mode": "local"
}Use --quiet to suppress progress and non-essential messages:
deckhtml index.html -o deck.pptx --quietExample stdout:
deck.pptx
Example stderr: no output.
Use -v or --verbose to write detailed logs to stderr:
deckhtml index.html -o deck.pptx --verboseExample stdout:
deck.pptx
Example stderr:
Mode: local
Input: index.html
Format: pptx
Output: deck.pptx
Rendering index.html
Writing deck.pptx
Done
--quiet and --verbose conflict:
deckhtml index.html --quiet --verboseRepresentative stderr:
Error: --quiet conflicts with --verbose
Representative JSON stderr when --json is also present:
{
"ok": false,
"error": {
"code": "usage_error",
"message": "--quiet conflicts with --verbose"
}
}Errors are written to stderr.
{
"error": {
"code": "usage_error",
"message": "--quiet conflicts with --verbose"
}
}Common error categories:
| Code | Meaning |
|---|---|
usage_error |
Invalid flags, missing input, bad mode, or conflicting flags. |
auth_error |
Cloud rejected the request with 401 (guest rate limit reached, guest access disabled, or an invalid/expired credential). Run deckhtml auth login or deckhtml config set api-key <key>. |
render_error |
The page could not be loaded or rendered. |
conversion_error |
Conversion failed after rendering. |
The error examples are representative. Scripts should rely on exit codes first, then parse JSON errors when --json is used.
| Code | Meaning |
|---|---|
0 |
Success. |
1 |
General conversion or runtime error. |
2 |
Usage error. |
3 |
Authentication error. |
DeckHTML defines --json, --quiet, and --verbose as invocation flags. Persistent config covers API key, PPTX size, webhook, and retention hours:
deckhtml config set api-key <key>
deckhtml config set size 1920x1080
deckhtml config set webhook https://example.com/webhooks/deckhtml
deckhtml config set retention-hours 3For CI, Docker, and agent environments, DECKHTML_API_KEY takes precedence over stored credentials:
export DECKHTML_API_KEY=your-api-keyDeckHTML separates data from diagnostics:
| Stream | Content |
|---|---|
| stdout | Final output path or JSON result. |
| stderr | Progress, warnings, verbose logs, and errors. |
This keeps pipelines clean:
OUTPUT=$(deckhtml index.html -o deck.pptx --json | jq -r '.output')