v0.1.4 · MIT Licensed

Create. Automate.
Present.

A powerful Python CLI for generating PowerPoint presentations programmatically. Templates, YAML input, charts, tables—all from your terminal.

$ pip install nietzsche

Features

Everything You Need

A complete toolkit for creating professional presentations from code.

Template Support

Use existing PowerPoint templates like Galaxy.pptx to maintain brand consistency across all your presentations.

YAML/JSON Input

Define your entire presentation in a simple YAML or JSON file. Perfect for automation, CI/CD pipelines, and batch generation.

Tables & Data

Create formatted data tables with headers, custom styling, and automatic cell sizing. Perfect for reports and dashboards.

Charts

Generate bar charts, line charts, and pie charts directly from your data. Multiple series support with automatic legends.

Images

Add images with automatic aspect ratio preservation. Supports positioning, sizing, and multiple image formats.

Speaker Notes

Add speaker notes to any slide programmatically. Perfect for generating training materials and documented presentations.

CLI Interface

Full-featured command-line interface with power command. Create, inspect, and modify presentations from your terminal.

Python API

Fluent Python API with method chaining. PowerPresentation and SlideBuilder classes for full programmatic control.

Quick Start

Simple by Design

Get started in seconds. Install and create your first presentation.

# Install the package
$ pip install nietzsche

# Create a simple presentation
$ power create my_deck.pptx --title "Q1 Report"
Created presentation: my_deck.pptx

# Use a template
$ power create themed.pptx -t Galaxy.pptx --title "Galaxy Theme"
Created presentation: themed.pptx

# Inspect a template's layouts
$ power inspect Galaxy.pptx
Slides: 13 | Layouts: 15 | Dimensions: 13.33" x 7.50"
title: Quarterly Business Review
subtitle: Q4 2024 Results

slides:
  - type: section
    title: Executive Summary

  - type: content
    title: Key Achievements
    bullets:
      - Revenue grew 25% year-over-year
      - Customer satisfaction at 94%
      - Launched 3 new product lines

  - type: table
    title: Financial Overview
    headers: [Metric, Q3, Q4, Change]
    data:
      - [Revenue, "$2.1M", "$2.6M", "+24%"]
      - [Net Profit, "$0.7M", "$1.1M", "+57%"]

  - type: chart
    title: Revenue by Region
    chart_type: bar
    categories: [NA, Europe, Asia]
    series:
      Q3: [1200, 500, 300]
      Q4: [1400, 650, 400]
from power import PowerPresentation

# Create from template
ppt = PowerPresentation(template="Galaxy.pptx")
ppt.clear_slides()

# Add title slide
ppt.add_title_slide("Q1 Report", "Sales Overview")

# Add content with bullets
ppt.add_content_slide("Key Metrics", [
    "Revenue: $2.5M (+20%)",
    "New customers: 150",
    "Retention: 95%"
])

# Add chart
slide = ppt.add_slide(5)
slide.set_title("Sales Trend")
slide.add_bar_chart(
    categories=["Jan", "Feb", "Mar"],
    series_data={"Sales": [100, 150, 200]}
)

ppt.save("report.pptx")

CLI Reference

The power Command

A complete command-line interface for presentation generation.

power create Create a new presentation with a title slide. Options: -t/--template for template file, --title, --subtitle.
power generate Generate presentation from YAML or JSON file. Options: -o/--output for output path, -t/--template for template.
power inspect Inspect a template's layouts, placeholders, and dimensions. Options: --json for JSON output.
power new Interactive mode: create presentations step-by-step with prompts for title, content, and slide types.
power add Add a slide to an existing presentation. Options: --title, --bullets (multiple), --layout.
power remove Remove a slide by index from a presentation. Specify 0-based slide index.
power replace Replace {{PLACEHOLDER}} text throughout a presentation. Usage: power replace template.pptx NAME=John -o output.pptx
"
He who has a why to live can bear almost any how.
— Friedrich Nietzsche

Examples

Common Workflows

See nietzsche in action with these real-world examples.

# Generate from YAML with template
$ power generate slides.yaml -o quarterly.pptx -t Galaxy.pptx
Generated presentation: quarterly.pptx
  Slides: 8

# Inspect available layouts in a template
$ power inspect Galaxy.pptx
┌─ PowerPoint Inspection ─┐
│ Galaxy.pptx             │
└─────────────────────────┘
 Slides: 13 | Layouts: 15
 0: Title Only Slide
 1: Title and image
 5: Title + Subtitle slide
 ...

# Add a slide to existing presentation
$ power add deck.pptx -o updated.pptx \
    --title "New Section" \
    --bullets "First point" \
    --bullets "Second point"
Added slide: New Section
Total slides: 9

# Replace placeholders in a template
$ power replace template.pptx \
    "COMPANY=Acme Corp" \
    "DATE=January 2025" \
    -o filled.pptx
Replaced 2 placeholder(s)