Skip to content

AfterPresets runtime reference

What the AfterPresets runtime does, and which reference file to read before you use any AP.* API.

These files are for the AI coding agent that builds an After Effects or Premiere Pro extension with AfterPresets. They describe the AP.* API that every panel gets.

The runtime is a small script that the AfterPresets CLI puts in front of each panel’s JavaScript. It is logic only. It draws nothing: your project owns every screen, style, and word the user sees.

It gives you:

  • AP.boot to start the panel.
  • Licensing, off in AP.boot by default (the starter project turns it on). Paid extensions must keep it on.
  • Signed updates with changelogs.
  • AP.host.eval to call ExtendScript functions in the app (After Effects or Premiere Pro).
  • AP.panels and AP.events for extensions with more than one panel.
  • AP.paths to find the images, videos and other files you ship.
  • AP.storage to save settings and other small data on this computer.

Do not edit the runtime and do not copy it into your source files. The CLI adds it for you. ap docs refreshes this folder from the installed runtime.

Read the relevant file below before you write or change code that uses AP.*. Do not guess option names, statuses, or callback shapes. If a file and your memory disagree, the file wins.

File Read it before you
boot.md call AP.boot, use ctx, or change when the app starts
licensing.md turn licensing on, write renderLicense, or change the license screen
updates.md change update options or the update screen, or show a changelog
host.md call the app from the panel or write jsx/ code
host-after-effects.md write ExtendScript for After Effects (jsx/aeft/)
host-premiere.md write ExtendScript for Premiere Pro (jsx/ppro/)
panels.md add a panel or modal, open/close panels, or send data between panels
assets.md add images, fonts, videos or other files, or import a file into the app
storage.md save settings, recent items or any other data between launches
Terminal window
ap dev # build, link into the app, rebuild on change
ap check # static checks; also run by ap dev and ap push
ap add panel settings --type modal
ap push # publish a release (production: a draft you publish on the website)
ap docs # refresh docs/afterpresets/ from the runtime

Panels run in Adobe CEP 10 or later (After Effects 2020+, Premiere Pro 2020+). Its browser is old (Chromium 74 in CEP 10). Modern JavaScript is fine in panel code (let/const, arrow functions, classes, async/await, ?., ??): the build converts it for Chromium 74. No top-level await, and built-in methods newer than Chromium 74 need a fallback. ExtendScript in jsx/ stays ES3 (see host.md).