Remove -a (--appid) to app:instance:invoke to invoke a script on all instances of an application. Instead add a new cmd app:invoke to do the same.