PowerPoint CLI
For installation and requirements, see README.md.
Batch Mode (recommended)
The server is stateful — create a presentation, then build it up, then save. Use the batch runner to execute multiple commands in a single session:
echo '<json>' | bun ~/.pi/agent/skills/powerpoint/powerpoint-batch.ts
bun ~/.pi/agent/skills/powerpoint/powerpoint-batch.ts recipe.json
bun ~/.pi/agent/skills/powerpoint/powerpoint-batch.ts --recipe '<json>'
Input format — a JSON object with a commands array:
{
"commands": [
{ "tool": "create_presentation" },
{ "tool": "add_slide", "args": { "title": "Hello World" } },
{ "tool": "manage_text", "args": { "slide_index": 0, "operation": "add", "left": 1, "top": 2, "width": 8, "height": 1, "text": "Body text", "font_size": 18 } },
{ "tool": "save_presentation", "args": { "file_path": "./output.pptx" } }
]
}
Output: JSON array of { tool, result } objects (or { tool, error } on failure).
The batch runner auto-injects presentation_id into all commands after create_presentation/open_presentation, so you don't need to track it yourself.
Single-Command Mode
For one-off read operations, use the single-command CLI:
bun ~/.pi/agent/skills/powerpoint/powerpoint-cli.js <command> [flags]
bun ~/.pi/agent/skills/powerpoint/powerpoint-cli.js --help
Useful for inspection commands that don't need state:
bun <cli> list-slide-templates
bun <cli> get-template-info --template-id title_slide
bun <cli> get-server-info
Available Tools
Lifecycle
create_presentation — create empty presentation
create_presentation_from_template — create from .pptx template: { "template_path": "./template.pptx" }
open_presentation — open existing file: { "file_path": "./deck.pptx" }
save_presentation — save to file: { "file_path": "./output.pptx" }
get_presentation_info — slide count, dimensions, properties
set_core_properties — set title, author, keywords, etc.
Slides
add_slide — add a slide: { "layout_index": 1, "title": "Slide Title" }
- layout_index: 0=Title, 1=Title+Content, 2=Section, 5=Blank, etc.
- Optional:
background_type ("solid"/"gradient"), background_colors, color_scheme
get_slide_info — shapes, layout info: { "slide_index": 0 }
extract_slide_text — all text from a slide: { "slide_index": 0 }
extract_presentation_text — all text from all slides
Text Content
populate_placeholder — fill a layout placeholder: { "slide_index": 0, "placeholder_idx": 1, "text": "Hello" }
add_bullet_points — bullets in a placeholder: { "slide_index": 0, "placeholder_idx": 1, "bullet_points": ["A", "B", "C"] }
manage_text — add/format text boxes:{ "slide_index": 0, "operation": "add", "left": 1, "top": 2, "width": 8, "height": 1, "text": "Hello", "font_size": 24, "bold": true, "color": [0, 0, 0] }
Operations: add, format, validate, format_runs
Images
manage_image — add/enhance images:{ "slide_index": 0, "operation": "add", "image_source": "./photo.png", "left": 1, "top": 2, "width": 4, "height": 3 }
source_type: "file" (default), "url", "base64"
Tables
add_table — add a data table:{ "slide_index": 0, "rows": 3, "cols": 4, "left": 1, "top": 2, "width": 8, "height": 3, "data": [["H1","H2","H3","H4"],["a","b","c","d"],["e","f","g","h"]] }
format_table_cell — style a cell: { "slide_index": 0, "shape_index": 0, "row": 0, "col": 0, "bold": true, "bg_color": [68, 114, 196] }
Charts
add_chart:{ "slide_index": 0, "chart_type": "bar", "left": 1, "top": 2, "width": 8, "height": 4, "categories": ["Q1","Q2","Q3"], "series_names": ["Revenue"], "series_values": [[100, 200, 300]] }
Note: series_values is an array of arrays (one inner array per series).
Chart types: bar, column, line, pie, scatter, area, doughnut
update_chart_data — replace data on existing chart
Shapes & Connectors
add_shape:{ "slide_index": 0, "shape_type": "rectangle", "left": 1, "top": 1, "width": 3, "height": 2, "fill_color": "4472C4", "text": "Box" }
Types: rectangle, rounded_rectangle, oval, triangle, diamond, arrow_right, etc.
add_connector — lines/arrows between points:{ "slide_index": 0, "connector_type": "straight", "start_x": 2, "start_y": 3, "end_x": 6, "end_y": 3 }
Design & Styling
apply_professional_design — apply themes: { "operation": "apply_theme", "color_scheme": "modern_blue" }
- Operations:
apply_theme, design_slide, enhance_slide
apply_picture_effects — shadow, reflection, etc.
optimize_slide_text — auto-resize fonts: { "slide_index": 0 }
manage_fonts — analyze/optimize: { "operation": "analyze", "font_path": "./deck.pptx" }
Templates
list_slide_templates — list available layout templates
get_template_info — details about a template: { "template_id": "title_slide" }
apply_slide_template — apply template to existing slide
create_slide_from_template — new slide from template
create_presentation_from_templates — full deck from template sequence
auto_generate_presentation — auto-generate from topic:{ "topic": "Q4 Results", "slide_count": 8, "presentation_type": "business", "color_scheme": "modern_blue" }
Other
manage_hyperlinks — add/remove/list links
manage_slide_transitions — set/remove transitions
manage_slide_masters — inspect master layouts
Reference
- Positions (
left, top) and sizes (width, height) are in inches. Standard slide is 10×7.5.
- Slide indices are 0-based.
- Colors: hex RGB without
# for shape fills (e.g., "4472C4"), RGB arrays [r, g, b] for text/cell colors.
- Color schemes:
modern_blue, corporate_gray, elegant_green, warm_red.
- Tool names accept both
snake_case and kebab-case.
1---2name: powerpoint3description: Create, edit, and manipulate PowerPoint presentations from the command line. Add slides, text, images, tables, charts, shapes, and apply professional designs. Use when the user wants to create or modify .pptx files.4---56# PowerPoint CLI78For installation and requirements, see [README.md](README.md).910## Batch Mode (recommended)1112The server is **stateful** — create a presentation, then build it up, then save. Use the batch runner to execute multiple commands in a single session:1314```bash15echo '<json>' | bun ~/.pi/agent/skills/powerpoint/powerpoint-batch.ts16bun ~/.pi/agent/skills/powerpoint/powerpoint-batch.ts recipe.json17bun ~/.pi/agent/skills/powerpoint/powerpoint-batch.ts --recipe '<json>'18```1920Input format — a JSON object with a `commands` array:2122```json23{24 "commands": [25 { "tool": "create_presentation" },26 { "tool": "add_slide", "args": { "title": "Hello World" } },27 { "tool": "manage_text", "args": { "slide_index": 0, "operation": "add", "left": 1, "top": 2, "width": 8, "height": 1, "text": "Body text", "font_size": 18 } },28 { "tool": "save_presentation", "args": { "file_path": "./output.pptx" } }29 ]30}31```3233Output: JSON array of `{ tool, result }` objects (or `{ tool, error }` on failure).3435The batch runner auto-injects `presentation_id` into all commands after `create_presentation`/`open_presentation`, so you don't need to track it yourself.3637## Single-Command Mode3839For one-off read operations, use the single-command CLI:4041```bash42bun ~/.pi/agent/skills/powerpoint/powerpoint-cli.js <command> [flags]43bun ~/.pi/agent/skills/powerpoint/powerpoint-cli.js --help44```4546Useful for inspection commands that don't need state:4748```bash49bun <cli> list-slide-templates50bun <cli> get-template-info --template-id title_slide51bun <cli> get-server-info52```5354## Available Tools5556### Lifecycle57- `create_presentation` — create empty presentation58- `create_presentation_from_template` — create from .pptx template: `{ "template_path": "./template.pptx" }`59- `open_presentation` — open existing file: `{ "file_path": "./deck.pptx" }`60- `save_presentation` — save to file: `{ "file_path": "./output.pptx" }`61- `get_presentation_info` — slide count, dimensions, properties62- `set_core_properties` — set title, author, keywords, etc.6364### Slides65- `add_slide` — add a slide: `{ "layout_index": 1, "title": "Slide Title" }`66 - layout_index: 0=Title, 1=Title+Content, 2=Section, 5=Blank, etc.67 - Optional: `background_type` ("solid"/"gradient"), `background_colors`, `color_scheme`68- `get_slide_info` — shapes, layout info: `{ "slide_index": 0 }`69- `extract_slide_text` — all text from a slide: `{ "slide_index": 0 }`70- `extract_presentation_text` — all text from all slides7172### Text Content73- `populate_placeholder` — fill a layout placeholder: `{ "slide_index": 0, "placeholder_idx": 1, "text": "Hello" }`74- `add_bullet_points` — bullets in a placeholder: `{ "slide_index": 0, "placeholder_idx": 1, "bullet_points": ["A", "B", "C"] }`75- `manage_text` — add/format text boxes:76 ```json77 { "slide_index": 0, "operation": "add", "left": 1, "top": 2, "width": 8, "height": 1, "text": "Hello", "font_size": 24, "bold": true, "color": [0, 0, 0] }78 ```79 Operations: `add`, `format`, `validate`, `format_runs`8081### Images82- `manage_image` — add/enhance images:83 ```json84 { "slide_index": 0, "operation": "add", "image_source": "./photo.png", "left": 1, "top": 2, "width": 4, "height": 3 }85 ```86 `source_type`: "file" (default), "url", "base64"8788### Tables89- `add_table` — add a data table:90 ```json91 { "slide_index": 0, "rows": 3, "cols": 4, "left": 1, "top": 2, "width": 8, "height": 3, "data": [["H1","H2","H3","H4"],["a","b","c","d"],["e","f","g","h"]] }92 ```93- `format_table_cell` — style a cell: `{ "slide_index": 0, "shape_index": 0, "row": 0, "col": 0, "bold": true, "bg_color": [68, 114, 196] }`9495### Charts96- `add_chart`:97 ```json98 { "slide_index": 0, "chart_type": "bar", "left": 1, "top": 2, "width": 8, "height": 4, "categories": ["Q1","Q2","Q3"], "series_names": ["Revenue"], "series_values": [[100, 200, 300]] }99 ```100 Note: `series_values` is an array of arrays (one inner array per series).101 Chart types: `bar`, `column`, `line`, `pie`, `scatter`, `area`, `doughnut`102- `update_chart_data` — replace data on existing chart103104### Shapes & Connectors105- `add_shape`:106 ```json107 { "slide_index": 0, "shape_type": "rectangle", "left": 1, "top": 1, "width": 3, "height": 2, "fill_color": "4472C4", "text": "Box" }108 ```109 Types: `rectangle`, `rounded_rectangle`, `oval`, `triangle`, `diamond`, `arrow_right`, etc.110- `add_connector` — lines/arrows between points:111 ```json112 { "slide_index": 0, "connector_type": "straight", "start_x": 2, "start_y": 3, "end_x": 6, "end_y": 3 }113 ```114115### Design & Styling116- `apply_professional_design` — apply themes: `{ "operation": "apply_theme", "color_scheme": "modern_blue" }`117 - Operations: `apply_theme`, `design_slide`, `enhance_slide`118- `apply_picture_effects` — shadow, reflection, etc.119- `optimize_slide_text` — auto-resize fonts: `{ "slide_index": 0 }`120- `manage_fonts` — analyze/optimize: `{ "operation": "analyze", "font_path": "./deck.pptx" }`121122### Templates123- `list_slide_templates` — list available layout templates124- `get_template_info` — details about a template: `{ "template_id": "title_slide" }`125- `apply_slide_template` — apply template to existing slide126- `create_slide_from_template` — new slide from template127- `create_presentation_from_templates` — full deck from template sequence128- `auto_generate_presentation` — auto-generate from topic:129 ```json130 { "topic": "Q4 Results", "slide_count": 8, "presentation_type": "business", "color_scheme": "modern_blue" }131 ```132133### Other134- `manage_hyperlinks` — add/remove/list links135- `manage_slide_transitions` — set/remove transitions136- `manage_slide_masters` — inspect master layouts137138## Reference139140- Positions (`left`, `top`) and sizes (`width`, `height`) are in **inches**. Standard slide is 10×7.5.141- Slide indices are **0-based**.142- Colors: hex RGB without `#` for shape fills (e.g., `"4472C4"`), RGB arrays `[r, g, b]` for text/cell colors.143- Color schemes: `modern_blue`, `corporate_gray`, `elegant_green`, `warm_red`.144- Tool names accept both `snake_case` and `kebab-case`.