Capacitor post-run script

I looked into the Capacitor run scripts and didn’t see a way to easily do this, but I thought I’d ask anyway:

What I’d love to be able to do is automatically run an AppleScript script I’ve written to open Safari’s web console when debugging on the iOS Simulator, so that I don’t have to do it manually every time (since Safari closes that console every time the app is relaunched).

I know there’s currently no capacitor:run script hook, which is basically the sort of thing I’m looking for.

Part of the trick is that it also has to wait until the app is deployed and launched in order for Safari to be able to open the console for it.