From Junos Space Release 13.1 and later, the Junos Space image comes integrated with the Junos OS User Interface Scripting Environment (JUISE), which enables you to execute a script on a remote device from the Junos Space server without having to stage the script on the device.
See the document Junos Space Local Scripts in Junos Space Resources