Loading...
Loading...
Automates Apple Keynote using JXA with AppleScript dictionary discovery. Use when asked to "create Keynote presentations", "automate slide decks", "JXA Keynote scripting", or "generate presentations programmatically". Covers document lifecycle, slides, text, shapes, images, tables, charts, transitions, and UI scripting fallback.
npx skill4agent add spillwavesolutions/automating-mac-apps-plugin automating-keynoteautomating-mac-appsautomating-mac-apps.name()Path()Path("/path/to/file")tell application "Keynote" to get name of document 1Application("Keynote").documents[0].name()Application("Keynote").documents.length > 0Application("System Events")tell application "Keynote"
get name of document 1
end tellconst keynote = Application("Keynote");
if (keynote.documents.length > 0) {
console.log(keynote.documents[0].name());
}const doc = keynote.documents[0];
const slide = doc.slides.push(keynote.Slide({baseSlide: doc.masterSlides['Title - Center']}));
slide.defaultTitleItem.objectText = "New Slide";const slide = doc.slides[0];
const img = keynote.Image({
file: Path("/Users/you/Desktop/diagram.png"), // Path() required!
position: { x: 100, y: 100 },
width: 800
});
slide.images.push(img);Path()automating-keynote/references/keynote-basics.mdautomating-keynote/references/keynote-recipes.mdautomating-keynote/references/keynote-deck-generator.mdautomating-keynote/references/keynote-chart-aware-deck.mdautomating-keynote/references/keynote-advanced.mdautomating-keynote/references/keynote-pyxa.mdautomating-keynote/references/keynote-pyxa-api-reference.md