Skip to content

Repository files navigation

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

CLI Usage

# Read a presentation (TOON format, optimized for AI)
slidekit read presentation.md

# Read with JSON output
slidekit read presentation.md --format json

# Plan changes (show diff)
slidekit plan presentation.md --desired updated.json

# Apply changes (requires confirmation)
slidekit apply presentation.md --diff changes.json --confirm

# Create a new presentation from JSON
echo '{"title": "My Deck", "sections": [...]}' | slidekit create new.md

# Start MCP server for AI assistant integration
slidekit serve

MCP Server Integration

Configure Claude Code to use slidekit as an MCP server:

{
  "mcpServers": {
    "slidekit": {
      "command": "/path/to/slidekit",
      "args": ["serve"]
    }
  }
}

Available MCP tools:

Tool Description
read_deck Read presentation in TOON/JSON format
list_slides List slide IDs and titles
get_slide Get single slide by ID
plan_changes Compute diff between states
apply_changes Apply diff (requires confirm=true)
create_deck Create new presentation
update_slide Update single slide (requires confirm=true)

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 1.5: CLI and MCP server for AI assistant integration
  • 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

About

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

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages