Several tutorial sites mention a scripting interface, but I couldn't find it. Turns out its hidden, this page gave clues to where it is:
Go to creative cloud, prefs, turn on 'show older apps'. Restart creative cloud, you'll find Extendscript Toolkit CC.
Debugging is also frustrating, as there's no console. You can print stuff kindasorta by forcing a fake expression with throw, eg
You'll get an error, when you click in the expression field, the error (ie the thing you want) will be shown in a tooltip. This can't be copypasted though, so if you need to access these values, you need to create a text layer, and have the text expression fetch the thing you want. Frustrating.