power cloud¶
Generate presentations via the cloud API instead of locally.
Overview¶
The power cloud command group allows you to generate presentations using the deployed Power API service. This is useful when you want to:
- Generate presentations without installing all dependencies locally
- Use the API from environments where python-pptx is difficult to install
- Integrate with CI/CD pipelines or other automated workflows
Subcommands¶
| Command | Description |
|---|---|
power cloud health |
Check API health status |
power cloud generate |
Generate presentation via cloud |
power cloud inspect |
Inspect template via cloud |
Configuration¶
Default API URL¶
By default, commands use the deployed Cloud Run service:
Custom API URL¶
Override the API URL using:
power cloud health¶
Check the cloud API health status.
Usage¶
Example¶
$ power cloud health
API Status: healthy
Version: 0.1.7
URL: https://power-api-944767079044.us-central1.run.app
power cloud generate¶
Generate a presentation via the cloud API.
Usage¶
Arguments¶
| Argument | Description |
|---|---|
INPUT_FILE |
YAML or JSON file describing the slides |
Options¶
| Option | Description |
|---|---|
-o, --output |
Output .pptx file (required) |
-t, --template |
Template .pptx file to upload |
Examples¶
Example Output¶
$ power cloud generate slides.yaml -o presentation.pptx
Generated via cloud: presentation.pptx
Size: 45,983 bytes
power cloud inspect¶
Inspect a template via the cloud API to see its layouts and placeholders.
Usage¶
Arguments¶
| Argument | Description |
|---|---|
TEMPLATE |
Template .pptx file to inspect |
Options¶
| Option | Description |
|---|---|
--json |
Output as JSON |
Examples¶
Example Output¶
╭─────────────────── Template Inspection ───────────────────╮
│ Galaxy.pptx (via cloud) │
╰───────────────────────────────────────────────────────────╯
Slides: 13
Layouts: 15
Available Layouts
├── 0: Title Only Slide
│ └── idx=0 Title 1 (CENTER_TITLE)
├── 1: Title and image
│ ├── idx=0 Title 1 (TITLE)
│ ├── idx=14 Picture Placeholder 18 (PICTURE)
│ └── idx=17 Text Placeholder 3 (BODY)
...
Error Handling¶
The cloud commands handle common errors gracefully:
| Error | Cause | Solution |
|---|---|---|
| "Cannot connect to API" | API unreachable | Check URL and network |
| "Request timed out" | Slow response | Try again or use local generation |
| "HTTP 500" | Server error | Check API logs or report issue |
Local Development¶
To test against a local API server: