Adding Script Via Command Line

I have a small suite of scripts that I use to synchronize web proxy information across several routers, and I’m attempting to make a script that will automate the installation of said suite, but I can’t seem to figure out how to add scripts to the script repository via the command line. I can create the script itself, but when I try to add the source it keeps giving me errors. Anyone know what I might be doing wrong? The documentation is entirely unhelpful.

just use this on an existing router with a script for an example:

/system script export

Thanks…