ap commands
Every command of the AfterPresets CLI (ap) with its options - login, init, dev, panel, host, comp, check, add, build, push, releases, testers, docs, sdk, upgrade and config.
ap is the AfterPresets command-line tool. Your agent runs it for you (it
uses the same commands to build, look at and click your panel, run scripts
in the app and publish); you only need this page if you like the terminal.
Install it with npm i -g afterpresets, or run it without installing as
npx afterpresets <command> (inside a project, npx ap <command> uses the
project’s own copy). ap --help lists the commands and
ap <command> --help shows the details of one. ap --version prints the
version.
Typing just ap (or npx afterpresets) in a folder that is not a project
starts the questions of ap init.
Account
Section titled “Account”| Command | What it does |
|---|---|
ap login [--no-browser] |
Opens afterpresets.com in your browser and waits until you approve (Authorize CLI). --no-browser prints the link instead. The login is saved in ~/.afterpresets/credentials.json, readable only by you. |
ap logout |
Revokes this computer’s login on AfterPresets and deletes the saved file. |
ap whoami |
Your username, plan, and production pushes used this month (UTC). |
Create a project
Section titled “Create a project”ap init <dir> [--app aeft|ppro] [--platform cep|native] [--starter react|blank] [--name <name>] [--slug <id>] [--skip-install]Registers a new product on AfterPresets, copies the starter into <dir>
(. for the current folder), writes afterpresets.json, copies the agent
reference into docs/afterpresets/, and runs npm install. Needs
ap login. Its permanent bundle ID is com.afterpresets.<you>.<slug>.
| Option | Meaning |
|---|---|
--app |
aeft (After Effects), ppro (Premiere Pro), or aeft,ppro for both. Required when there is no terminal to ask in (for example when an agent runs it). |
--platform |
cep (an extension, the default) or native (an After Effects effect plugin). Permanent: another platform later is a separate product. |
--starter |
Extensions: react (the default) builds the panels with React components styled with Tailwind CSS v4. ap init adds both to the project, pinned to the versions the CLI supports; ap upgrade updates them. It needs After Effects or Premiere Pro 2022 or newer. blank is plain HTML, CSS and JavaScript and runs in every supported version (2020 and newer). In a terminal, ap init asks; otherwise it uses react. |
--name |
The product name. |
--slug |
The short ID used in the bundle ID. |
--skip-install |
Do not run npm install. |
Examples:
ap init my-tool --app ppro --name "My Tool"ap init my-tool --app aeft,ppro --name "My Tool"ap init my-tool --app aeft --starter blank --name "My Tool"ap init soft-glow --platform native --app aeft --name "Soft Glow"Develop
Section titled “Develop”ap dev [--once] [--no-reload] [--restart] [--background]
Section titled “ap dev [--once] [--no-reload] [--restart] [--background]”Extensions: builds a readable development copy into
dist/dev/<bundleId>/, links it into the app’s extensions folder, turns on
PlayerDebugMode (so the app loads unsigned extensions), runs ap check,
and rebuilds whenever a file changes. Open panels reload themselves after
each rebuild. Panel number i in afterpresets.json gets the debugging port
debugPort + i.
Plugins: builds the plugin for this computer, installs it into
MediaCore/AfterPresets Dev/, installs the dev bridge (how the agent reaches
After Effects), converts Adobe’s SDK guide into docs/afterpresets/sdk/,
and says when After Effects must restart. Rebuilds on save.
| Option | Meaning |
|---|---|
--once |
Build and install once, without watching. |
--no-reload |
Extensions: turn off automatic panel reload. |
--restart |
Plugins, macOS: restart After Effects when needed, but only when it is safe (the open project is saved, or a scratch project). It never force-quits. On Windows After Effects is never restarted automatically. |
--background |
Start the watcher as a background process, wait for the first build, print its output and return. The output keeps going to dist/dev/ap-dev.log. This is how agents run it. |
ap dev status shows the last build (ok or failed, its errors, and for
plugins whether After Effects must restart). ap dev stop stops the watcher;
the installed build stays.
ap panel
Section titled “ap panel”Looks at and drives your open development panels like a user, through each
panel’s debugging port (development builds only; the panel must be open).
Every command takes --panel <id> (default: the first panel).
| Command | What it does |
|---|---|
ap panel list |
Every panel, its port, whether it can be reached, and the last build. |
ap panel snapshot |
An outline of what the panel shows, with a ref like e12 on everything you can click or type in. Refs change with every snapshot. |
ap panel screenshot [<ref>] [--out <file.png>] |
Saves a PNG of the panel (or of one element) and prints its path. Without --out it goes to dist/dev/shots/. |
ap panel click <ref> |
Clicks an element (or --selector <css>, --text <text>; --double). |
ap panel type [<ref>] <text> |
Replaces the text of a field (or --into <label>; --submit presses Enter). |
ap panel press <key> |
Presses a key, e.g. Enter, Escape, Control+A. |
ap panel wait <text> |
Waits until text (or --selector) appears, or disappears with --gone. |
ap panel upload <file...> --ref <ref> |
Sets the files of a file input. |
ap panel choose-file <file...> |
Makes the next native open dialog return these files (run it before the click; --folder for folders). |
ap panel logs [--errors] [--clear] |
Console messages and errors since the panel loaded. |
ap panel eval '<js>' |
Runs JavaScript in the panel and prints the result. |
ap panel reload |
Reloads the panel. |
ap panel license <status|off> |
Shows the license screen in one status, for screenshots. |
ap host
Section titled “ap host”Talks to After Effects or Premiere Pro: through your panel, or through the AfterPresets dev bridge for projects without panels (plugins).
| Command | What it does |
|---|---|
ap host eval '<jsx>' |
Runs ExtendScript and prints the result. Also -e '<jsx>', --file <script.jsx>, or - to read it from the input. In After Effects each run is one undo step unless --no-undo. It changes the open project, so test in a scratch project. |
ap host scratch [save|discard] |
Opens an empty project to test in. After Effects closes your open project: with unsaved changes it does nothing unless you say save or discard. Premiere Pro keeps your project open. |
ap host bridge [status|install|remove] |
The dev bridge. After install, restart the app once. |
ap host restart |
Plugins, macOS: restarts After Effects to load a new build, only when it is safe. |
ap comp capture
Section titled “ap comp capture”Renders frames of an After Effects composition and saves them as PNG files
(dist/dev/shots/ unless --out). --comp <name> or --comp-id <id>
(default: the active composition), --frames 0,30,60 and/or
--seconds 1.5 (up to 12, default: the current time), --max-size <px>,
--no-purge (keep After Effects’ caches), --keep32 (32-bpc projects).
ap check [--types] [--types-all]
Section titled “ap check [--types] [--types-all]”The checks that must pass before a push. ap dev and ap push run them for
you. Errors block a push; warnings do not.
- Extensions: every panel has
index.htmlandmain.js, bundles (no missing imports, no top-levelawaitor other syntax the build cannot convert for Chromium 74) and callsAP.boot; a panel with licensing on has a license screen; a paid product has licensing on. Warnings for unhandled license statuses,localStorage(useAP.storage), files no panel uses, and non-.jsxfiles injsx/. - Plugins:
effect.jsonis valid; the match name and control ids have not changed since the last release; the effect’s code follows the rules for flags, rendering, bit depths and threads; no Adobe SDK files or text copied into the project. Each finding namesfile:line. Silence a false alarm on one line with// ap-check: allow <code>.
--types (extensions) adds optional hints for ExtendScript in jsx/:
misspelled names, wrong argument counts, methods ExtendScript lacks. They can
be wrong and never fail the check. --types-all lists every hint, including
likely false alarms.
The paid-product rule needs ap login; offline it is a warning (ap push
enforces it).
ap add
Section titled “ap add”ap add panel <id> [--type panel|modal|invisible] [--title <title>] [--width <px>] [--height <px>]ap add host aeft|pproap add panelcreatessrc/panels/<id>/and adds the panel toafterpresets.json. Ids use lowercase letters, digits and dashes. Restart the app afterwards. See Multiple panels.ap add hostmakes an extension run in the other app too. Needsap login. See After Effects + Premiere Pro.
Extensions only.
ap build [--report] [--os mac,win]
Section titled “ap build [--report] [--os mac,win]”Runs the check and builds the release into dist/release/, exactly what ap push
uploads. Extensions: the production bundle in dist/release/<bundleId>/, with
the panel code minified. --report lists what each panel’s main.js is made
of: every npm package (such as react-dom), each folder of your code, the
AfterPresets runtime and the ExtendScript, with their sizes.
Plugins: the buyer ZIP dist/release/<bundleId>-<version>.zip with the plugin,
its install scripts and readme.txt. On a Mac it holds the macOS .plugin
and the Windows .aex (choose with --os mac, --os win or
--os mac,win, the default). On Windows it holds the Windows .aex,
windows-install.bat and readme.txt only: the macOS version can only be
built on a Mac.
Publish
Section titled “Publish”ap push [--channel test|production] [--bump patch|minor|major] [-m <notes>] [--os mac,win]
Section titled “ap push [--channel test|production] [--bump patch|minor|major] [-m <notes>] [--os mac,win]”Runs the check, bumps the version, builds, uploads, and AfterPresets signs
the release. Without options it asks for the channel and the version. -m
sets the release notes (Markdown). Without it, the commit messages since your
last release are used as a starting point. A paid product must have licensing
on. The new version is written to afterpresets.json once the upload
succeeds. For plugins, --os picks the versions in the release, as in
ap build (default: both on a Mac, Windows only on a Windows PC). See
Testers and publishing.
Test pushes reach your testers right away. A production push becomes a
draft: nothing reaches buyers yet. ap push prints a link to the draft on
afterpresets.com, where you finish the release notes with a live preview and
click Publish to production, now or later: the draft keeps. In a terminal
ap push opens the page and finishes. When an agent or a script runs it, it
prints the link and exits with code 3 (“waiting for approval”). Only you can publish, on the
website: an agent can’t. Publishing counts toward your monthly limit, and
AfterPresets emails you after each one.
ap releases
Section titled “ap releases”ap releases listap releases promote <version>ap releases rollback <version> [--channel production|test]list shows the production and test heads and every release, drafts
included. rollback --channel test points the test channel at an older
release. Production changes happen on the website: promote and a
production rollback print a link to your product’s releases on
afterpresets.com (and open it in a terminal), where you promote or roll back.
Exit code 3 means nothing changed yet.
ap testers
Section titled “ap testers”ap testers listap testers add <email>ap testers remove <email>How many testers a product can have depends on your plan
(Pricing); list
shows used/limit. Testers get test-channel releases. add and
list print the tester link (afterpresets.com/p/<id>/test) to send them: a
tester signs in there with the invited email, downloads the test build, and
gets later test builds as updates.
Maintain
Section titled “Maintain”| Command | What it does |
|---|---|
ap docs |
Refreshes docs/afterpresets/ from the installed CLI (plugins: also the SDK guide and vendor/ap_native/). ap upgrade runs it for you. |
ap upgrade |
Installs the latest afterpresets into this project, refreshes the docs and runtime files, and runs ap check. Test with ap dev, then push: buyers get the new runtime with your next release. |
ap sdk |
Plugins: shows the installed Adobe After Effects SDK (exit code 1 when none). |
ap sdk install [<zip-or-folder>] [--wait] [--no-open] [--minutes <n>] [--force] |
Installs the newest After Effects SDK zip from your Downloads folder, or the one you name, into ~/.afterpresets/sdk/<version>/ (Windows: %USERPROFILE%\.afterpresets\sdk\<version>\). Download the SDK for the system you build on. --wait opens Adobe’s page and waits for the download (default 10 minutes, --minutes); on by default in a terminal. --no-open does not open the browser. --force reinstalls. |
ap sdk open |
Opens Adobe’s download page. |
ap config [get [key] | set <key> <value> | unset <key>] |
For AfterPresets contributors only. |
AP_DEBUG=1 ap <command> prints the full error details.