Agents and the Command Line
Everything the editor does is a command with an id, such as comp.new, layer.newText or renderQueue.render, and the menus, the panels and scripts all run the same commands. The editor's program, DivookaMotionEditor.exe, also offers them outside the window in three ways:
| Way | Start it with | For |
|---|---|---|
| MCP server | DivookaMotionEditor.exe --mcp |
An AI agent working on a project, with or without the window. |
| Control channel | DivookaMotionEditor.exe --control 9877 |
An agent or a test driving the open window as a person would. |
| Command line | DivookaMotionEditor.exe --cli <command> |
One job from a terminal or a batch file: look at a project, change it, render it. |
Each change made through them is an undo step, as if it had been made in the window, and each command is refused with a reason when it cannot apply.
An AI agent, through MCP
--mcp serves the editor's tools over standard input and output to any client that speaks the Model Context Protocol. On its own it works on a project of its own, with no window: start it with --project F.ecproj to open a project, or --demo for the demo project. With --bridge 9877 it drives the editor you have open instead, which you start with --control 9877, so you can watch the agent work and step in.
For Claude Code:
claude mcp add divooka-motion -- "C:\path\to\DivookaMotionEditor.exe" --mcp
For a client that reads an mcpServers file:
{ "mcpServers": {
"divooka-motion": { "command": "C:\\path\\to\\DivookaMotionEditor.exe", "args": ["--mcp", "--bridge", "9877"] } } }
Put in the path of DivookaMotionEditor.exe where the editor is installed on your computer. The tools let the agent list and run every command, read a project, a composition or a layer's properties, set values, keyframes and expressions, apply effects, render a frame to look at, run a script, and undo; over the bridge it can also take screenshots of the window and click, drag and type in it.
With --autosave, a server working without the window writes the project to disk after every change it makes, in Auto-Save\MCP in the editor's data folder, so nothing is lost if the client stops it; the server tells the client where.
The open window, through the control channel
DivookaMotionEditor.exe --control 9877 starts the editor with a control channel on port 9877, listening on this computer only (127.0.0.1) and with no password, so start it only when you want it. Through it an agent runs commands and also operates the window itself: it presses keys, clicks, drags, drops files, answers file dialogs, and asks what is on the screen. DIVOOKA_CONTROL_PORT=9877 in the environment does the same as --control.
The command line
--cli runs one command and ends, printing what it found; add --json for a single JSON document a program can read. It works on a project named after the command, or on the demo project when none is named (an empty project for commands and script).
| Command | What it does |
|---|---|
info |
The editor's version, the project's items and the active composition's layers. |
commands [--filter TEXT] |
Every command, with its key and parameters. |
exec ID key=value… |
Runs one command, such as exec layer.newText text=Hello. |
run ID JSON [ID JSON …] |
Runs several commands in order. |
props COMP LAYER |
A layer's properties, each with the path get and set take. |
get COMP LAYER PATH [--time S] |
Reads a property, such as transform/position. |
set COMP LAYER PATH VALUE [--time S] |
Sets a property, or a keyframe at a time; --expression sets an expression. |
render-frame [--comp C] [--time S] --out F.png |
Renders one frame to a picture. |
render --out FILE [--comp C] [--format F] |
Renders a composition to a movie or a sequence, with the Render Queue's settings as options; render --queue renders the project's Render Queue as it is. |
script F.jsx or script --eval CODE |
Runs an After Effects script; see Scripting. |
exec, run, set and script change the project; add --save to save it in place, or --save-as F.ecproj to save it as another file. A composition is named by its name or number (- for the active one), and a layer by its name, its id or #n for its place from the top.
DivookaMotionEditor.exe --cli script Title.jsx --save-as title.ecproj
DivookaMotionEditor.exe --cli render-frame title.ecproj --comp Title --time 0.5 --out title.png
DivookaMotionEditor.exe --cli render title.ecproj --comp Title --out title.mp4
DivookaMotionEditor.exe --cli help prints every option. The command line exits with status 0 when the command worked, 1 when it failed and 2 when it was written wrongly.
Keeping an agent to its folders
--automation-read-root DIR and --automation-write-root DIR, given to --mcp or --cli as often as needed, keep the agent to those folders: it reads files only under a read or write root and writes only under a write root, and a command that would reach elsewhere is refused before it runs. With them, scripts and the commands that open other programs or Explorer are refused too.
See also
- Scripting - After Effects scripts, which the agent tools and the command line also run.
- Keyboard shortcuts - the window's commands that have keys.