slidekit

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2026 License: MIT

README ΒΆ

slidekit

Build Status Lint Status Go Report Card Docs Visualization License

An AI-optimized toolkit for reading, modifying, and generating slide decks across multiple presentation formats.

Overview

slidekit provides deterministic CLI and MCP (Model Context Protocol) interfaces for AI assistants, backed by reusable Go libraries. It enables programmatic control over presentations with a canonical data model that works across formats.

Features

  • πŸ“¦ Canonical data model - Unified representation for slides, sections, blocks, and audio metadata
  • πŸ”„ Multi-format support - Marp Markdown (implemented), Google Slides, Reveal.js (planned)
  • ⚑ TOON output - Token-Optimized Object Notation for efficient AI consumption (~8x smaller than JSON)
  • πŸ” Lossless round-tripping - Parse and regenerate without data loss
  • 🎀 Speaker notes - Full support for presenter notes with SSML markers
  • πŸŽ“ LMS integration - Section-based structure for educational platform export (Udemy, Teachable)
  • βœ… Plan/Apply workflow - Safe, reviewable changes before mutation

Installation

go install github.com/grokify/slidekit/cli/cmd/slidekit@latest

Or add as a dependency:

go get github.com/grokify/slidekit

Quick Start

Parse a Marp Markdown file
package main

import (
    "fmt"
    "github.com/grokify/slidekit/backends/marp"
    "github.com/grokify/slidekit/format"
)

func main() {
    // Parse a Marp Markdown file
    reader := marp.NewReader()
    deck, err := reader.ReadFile("presentation.md")
    if err != nil {
        panic(err)
    }

    fmt.Printf("Title: %s\n", deck.Title)
    fmt.Printf("Sections: %d\n", len(deck.Sections))
    fmt.Printf("Total slides: %d\n", deck.SlideCount())

    // Output in TOON format (token-optimized)
    encoder := format.NewTOONEncoder()
    output := encoder.EncodeDeck(deck)
    fmt.Println(output)
}
Write a deck to Marp Markdown
writer := marp.NewWriter()
err := writer.WriteFile(deck, "output.md")
Use the Backend interface
import "context"

backend := marp.NewBackend()
ctx := context.Background()

// Read
ref := model.Ref{Backend: "marp", Path: "deck.md"}
deck, err := backend.Read(ctx, ref)

// Plan changes
diff, err := backend.Plan(ctx, ref, modifiedDeck)

// Apply changes
err = backend.Apply(ctx, ref, diff)

Data Model

Core Types
Type Description
Deck Complete presentation with metadata, sections, and theme
Section Groups slides (maps to LMS chapters)
Slide Individual slide with layout, content, and notes
Block Content unit (paragraph, bullet, code, image, quote, heading)
Audio Audio attachment for TTS/video generation
Diff Change tracking between deck states
Slide Layouts
  • title - Title slide
  • title_body - Title with body content
  • title_two_col - Title with two columns
  • section - Section divider
  • blank - No predefined structure
  • image - Full-bleed image
  • comparison - Side-by-side comparison
Block Kinds
  • paragraph - Plain text
  • bullet - Bulleted list item
  • numbered - Numbered list item
  • code - Code block with language
  • image - Image with URL and alt text
  • quote - Block quote
  • heading - Subheading (levels 2-6)

TOON Output Format

TOON (Token-Optimized Object Notation) provides a compact, human-readable format optimized for AI token efficiency:

deck AI & Dev Productivity
meta author John Wang
meta date 2026-01-22

section intro
  slide s1 title
    title AI & Dev Productivity
    subtitle Best Practices for 2026

section fundamentals
  slide s2 title_body
    title Why AI Matters
    bullet Faster iteration
    bullet Lower cognitive load
    note Emphasize the productivity gains

Roadmap

  • Phase 1: Marp Markdown reader/writer, TOON format, canonical model
  • Phase 2: Google Slides integration (read/write/sync)
  • Phase 3: Reveal.js HTML generation
  • Phase 4: LMS/Video integration (Udemy export, audio assignment)

Development

Requirements
  • Go 1.23 or later
Build
go build ./...
Test
go test -v ./...
Lint
golangci-lint run

License

MIT License - see LICENSE for details.

Contributing

Contributions are welcome. Please ensure:

  1. All tests pass (go test -v ./...)
  2. Linting passes (golangci-lint run)
  3. New code includes appropriate tests
  4. Commit messages follow Conventional Commits

References

Directories ΒΆ

Path Synopsis
backends
marp
Package marp implements the Marp Markdown backend for slidekit.
Package marp implements the Marp Markdown backend for slidekit.
Package format provides serialization formats for slidekit.
Package format provides serialization formats for slidekit.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL