As far as I understand your request, Spring Shell is not intended for this. Spring Shell is somewhat tied to running in a real terminal using JLine. Another implementation may be written (similar to the "running in IDE" approach), which scans MethodTargets and launches them, taking input from your (user) web application.
Perhaps http://www.crashub.org/ is more tailored to what you are asking for.
source share