spring-projects / spring-shell

Spring based shell
http://projects.spring.io/spring-shell/
Apache License 2.0
710 stars 391 forks source link

Single + Default Command #1067

Open danvega opened 2 months ago

danvega commented 2 months ago

What if my application is only going to have a single command? I would love the ability to define a configuration property that says I only have a single command and here is what it is. When I run the program I am dropped into the shell and whatever I type is now the argument to the single default command.

This came up when building a Spring Shell + Spring AI application that interfaces with Open AI's GPT-4. I have included the rep for reference below.

https://github.com/danvega/sbdocs

helloshisheng commented 2 months ago

i think u can see this https://docs.spring.io/spring-shell/reference/customization/singlecommand.html

jvalkeal commented 1 month ago

Ups, linked and closed wrong issue

jvalkeal commented 1 month ago

Little clarification when I discussed with Dan. This is about interactive shell and having that one command there without having a need to define that command.