Do you need to run groovy scripts from file system?
AEM Groovy Console CLI gives you an ability to work with groovy console (run scripts) in a following manner:
gconsole run -h http://localhost:4502 -l admin -p admin -f some-script.groovy
Usage:
gconsole run [options]
Runs single groovy script (if file name --file is specified in [options] ) or all groovy scripts in current directory(if option is set to 'all' and --file is not specified)
Options:
-h, --hostname Hostname of AEM instance (default: http://localhost:4502)
-l, --login AEM user login (default: admin)
-p, --password AEM user password (default: admin)
-f, --file Groovy file to invoke script
-m, --mode Use 'all' to run all groovy scripts in current directory
-r, --result Condition of showing the script result. Set 'true' to see result
-t, --time Condition of showing the script running time. Set 'true' to see time