Skip to main content

CLI and library foundation for AI-powered slide generation.

Project description

nanoslides

nanoslides is a Python library and CLI designed to generate high-quality presentation slides using AI image models.

Unlike tools that prioritize one-off generations, nanoslides is built to be used programmatically. It focuses on maintaining visual consistency across an entire deck through a robust styling system and project-state management.

Key Concepts

  • Library First: Designed to be integrated into web apps, automated agents, and custom scripts.
  • Stateless Generation: The core engines can generate multiple variations without forcing side effects on your project state.
  • Consistent Styling: Define global or project-specific styles (base prompts, negative prompts, and reference images) to ensure every slide feels part of the same deck.
  • CLI for Humans & Agents: A powerful interface for quick iterations and for AI agents like OpenClaw-based bots.

Installation

pip install nanoslides

Programmatic Usage

You can use nanoslides directly in your Python projects. This is the recommended way for building applications that need to generate multiple variations before committing them to a presentation.

from pathlib import Path
from nanoslides.engines.nanobanana import NanoBananaSlideEngine, NanoBananaModel
from nanoslides.core.style import ResolvedStyle

# 1. Initialize the engine
engine = NanoBananaSlideEngine(
    model=NanoBananaModel.PRO,
    api_key="YOUR_GEMINI_API_KEY",
    output_dir=Path("./my_slides")
)

# 2. Define a style (optional)
style = ResolvedStyle(
    base_prompt="Minimalist corporate design, flat vectors, blue and white palette.",
    reference_images=["./assets/brand_guide_style.png"]
)

# 3. Generate variations
# The library doesn't update slides.json automatically; the client handles the state.
result = engine.generate(
    prompt="A slide showing a growth chart for Q4 revenue",
    style=style
)

print(f"Slide saved to: {result.local_path}")
print(f"Revised prompt used: {result.revised_prompt}")

CLI Usage

The CLI is perfect for managing projects and providing a guided workflow.

Quick Start

# Setup your API keys
nanoslides setup

# Initialize a new presentation project
nanoslides init MyPresentation
cd MyPresentation

# Create a consistent style for the project
nanoslides styles create --slides-base-reference ./branding.png

# Generate a slide
nanoslides generate "Introduction to AI in healthcare"

Advanced CLI Commands

  • nanoslides styles steal ./image.png: Automatically infer style parameters from an existing image using Gemini Vision.
  • nanoslides styles generate "clean Swiss-style layouts with muted blue accents" --reference-image ./brand.png: Preview a generated style, then choose whether to save it to project style.json or globally.
  • nanoslides edit <slide-id> "Make the colors warmer": Iterate on a specific slide while maintaining its context.
  • nanoslides clearall: Preview every slide in the current project, then confirm before deleting them all.
  • nanoslides deck "Launch plan for Product X" --detail-mode presenter --length short: Plan and generate a full deck from one prompt with Gemini 3 Pro orchestration.
  • nanoslides export --format pptx: Compile your generated images into a PowerPoint file.

Project Structure

  • slides.json: Tracks the current state of your presentation (order, IDs, prompts, and file paths).
  • style.json: Project-specific style overrides.
  • slides/: Default directory for generated assets.

Roadmap & Improvements

We are currently working on:

  • Separating CLI state management from the core library logic (removing "draft" hacks from the core).
  • Enhancing the SlideEngine interface to support more providers (OpenAI, Flux).
  • Improving the "Style Steal" accuracy for complex compositions.
  • Adding more robust unit testing for the library API.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nanoslides-0.1.0.tar.gz (42.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nanoslides-0.1.0-py3-none-any.whl (51.6 kB view details)

Uploaded Python 3

File details

Details for the file nanoslides-0.1.0.tar.gz.

File metadata

  • Download URL: nanoslides-0.1.0.tar.gz
  • Upload date:
  • Size: 42.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nanoslides-0.1.0.tar.gz
Algorithm Hash digest
SHA256 19343aa1d0f2be9665cde2f1b144020b96cdb026735764565ba5ae544f2440b4
MD5 e3fcbf8b0c650644657f11f7c8ace5fb
BLAKE2b-256 a82215c3537125c3f4169073b46697f7f51a4893a0e371f0dfb6b5c47c655388

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanoslides-0.1.0.tar.gz:

Publisher: release.yml on azapg/nanoslides

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanoslides-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nanoslides-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 51.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nanoslides-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92005166476a235d6be3bc303bf8dc52dde58a16f3b5536f247a6fd3231f8de2
MD5 e5fde0b70e4bf32c4df192c4056c216a
BLAKE2b-256 93dc1d5ffbb75ace0fb7f1a497ee1658826d135b81d28e261c837bd8a5ece2ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanoslides-0.1.0-py3-none-any.whl:

Publisher: release.yml on azapg/nanoslides

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page