Skip to content

Commit 347b49b

Browse files
committed
Update readme
1 parent fcb4f07 commit 347b49b

File tree

1 file changed

+97
-2
lines changed

1 file changed

+97
-2
lines changed

README.adoc

Lines changed: 97 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,97 @@
11
= Spring Shell
22

3-
Active development branch is `main` targeting work for `3.1.x`. `3.0.x` and `2.1.x` are for maintaining current active releases.
3+
Spring Shell helps you to create Spring-powered, production-grade applications targeting
4+
_CLI_ space. It takes an opinionated view of the Spring platform so that new and existing
5+
users can quickly get to the bits they need.
6+
7+
You can use Spring Shell to create stand-alone Java applications that can be started using
8+
java -jar or more sophisticated GraalVM native ways to create platform dependant apps.
9+
10+
Our primary goals are:
11+
12+
* Provide a radically faster and widely accessible getting started experience for shell development.
13+
* Be opinionated, but get out of the way quickly as requirements start to diverge from the defaults.
14+
15+
== Installation and Getting Started
16+
17+
Here is a quick teaser of a complete Spring Shell application in Java:
18+
19+
[source,java,indent=0]
20+
----
21+
import org.springframework.boot.SpringApplication;
22+
import org.springframework.boot.autoconfigure.SpringBootApplication;
23+
import org.springframework.shell.standard.ShellComponent;
24+
import org.springframework.shell.standard.ShellMethod;
25+
26+
@SpringBootApplication
27+
@ShellComponent
28+
public class DemoApplication {
29+
30+
@ShellMethod
31+
public String hi() {
32+
return "hi";
33+
}
34+
35+
public static void main(String[] args) {
36+
SpringApplication.run(DemoApplication.class, args);
37+
}
38+
}
39+
----
40+
41+
Running it as _jar_ interactive:
42+
43+
[source,bash]
44+
----
45+
$ java -jar demo.jar
46+
47+
shell:>help
48+
AVAILABLE COMMANDS
49+
50+
Built-In Commands
51+
help: Display help about available commands
52+
stacktrace: Display the full stacktrace of the last error.
53+
clear: Clear the shell screen.
54+
quit, exit: Exit the shell.
55+
history: Display or save the history of previously run commands
56+
version: Show version info
57+
script: Read and execute commands from a file.
458
5-
== Building
59+
Demo Application
60+
hi:
61+
62+
shell:>hi
63+
hi
64+
----
65+
66+
Running it as _jar_ non-interactive:
67+
68+
[source,bash]
69+
----
70+
$ java -jar demo.jar hi
71+
72+
hi
73+
----
74+
75+
== Getting Help
76+
Are you having trouble with Spring Shell? We want to help!
77+
78+
* Join our GitHub Discussion section and post your question there.
79+
80+
== Reporting Issues
81+
Spring Shell uses GitHub's integrated issue tracking system to record bugs and feature requests.
82+
If you want to raise an issue, please follow the recommendations below:
83+
84+
* Before you log a bug, please search the {github}/issues[issue tracker] to see if someone has already reported the problem.
85+
* If the issue doesn't already exist, {github}/issues/new[create a new issue].
86+
* Please provide as much information as possible with the issue report.
87+
We like to know the Spring Boot and Shell version, operating system, and JVM version you're using.
88+
* If you need to paste code or include a stack trace, use Markdown.
89+
+++```+++ escapes before and after your text.
90+
* If possible, try to create a test case or project that replicates the problem and attach it to the issue.
91+
92+
== Building from Source
93+
94+
Active development branch is `main` targeting work for `3.1.x`. `3.0.x` and `2.1.x` are for maintaining current active releases.
695

796
Building and running tests:
897

@@ -15,3 +104,9 @@ Publishing to local maven cache:
15104
```
16105
./gradlew publishToMavenLocal
17106
```
107+
108+
== Example
109+
https://github.com/spring-projects/spring-shell/tree/main/spring-shell-samples/[Sample] is a current demonstration how to use `spring-shell`.
110+
111+
== License
112+
Spring Shell is Open Source software released under the https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license].

0 commit comments

Comments
 (0)