Janne Valkealahti 2d29050c34 Make Catalog browsers focusable with shortcuts
- Category and scenario list views can now be focused with
  ctrl+a/ctrl+s.
- Bind all keys with ctrl modifier
- Add "shortcut" concept to views which currently hooks to
  hot keys.
- In a catalog app by using a "shortcut" then takes the key
  event as a hot key, as it consumes resulting behaviour
  is to focus.
- Move view initInternal away from constructor call to
  require user to call init() which is not in a
  View interface
- Relates #826
2023-11-12 16:43:11 +00:00
2023-11-07 11:16:07 +00:00
2023-06-15 10:49:52 +01:00
2023-10-20 09:10:27 +01:00
2023-07-15 16:24:46 +01:00
2022-08-16 10:30:15 +01:00
2019-03-26 11:48:55 +01:00
2017-08-08 11:52:31 +02:00
2023-10-20 09:10:27 +01:00
2023-10-20 09:10:27 +01:00
2019-03-26 11:48:12 +01:00
2023-09-24 09:05:19 +01:00

= Spring Shell

Spring Shell helps you to create Spring-powered, production-grade applications targeting
_CLI_ space. It takes an opinionated view of the Spring platform so that new and existing
users can quickly get to the bits they need.

You can use Spring Shell to create stand-alone Java applications that can be started using
java -jar or more sophisticated GraalVM native ways to create platform dependant apps.

Our primary goals are:

* Provide a radically faster and widely accessible getting started experience for shell development.
* Be opinionated, but get out of the way quickly as requirements start to diverge from the defaults.

== Installation and Getting Started

Here is a quick teaser of a complete Spring Shell application in Java:

[source,java,indent=0]
----
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.shell.standard.ShellComponent;
import org.springframework.shell.standard.ShellMethod;

@SpringBootApplication
@ShellComponent
public class DemoApplication {

	@ShellMethod
	public String hi() {
		return "hi";
	}

	public static void main(String[] args) {
		SpringApplication.run(DemoApplication.class, args);
	}
}
----

Running it as _jar_ interactive:

[source,bash]
----
$ java -jar demo.jar

shell:>help
AVAILABLE COMMANDS

Built-In Commands
       help: Display help about available commands
       stacktrace: Display the full stacktrace of the last error.
       clear: Clear the shell screen.
       quit, exit: Exit the shell.
       history: Display or save the history of previously run commands
       version: Show version info
       script: Read and execute commands from a file.

Demo Application
       hi:

shell:>hi
hi
----

Running it as _jar_ non-interactive:

[source,bash]
----
$ java -jar demo.jar hi

hi
----

== Getting Help
Are you having trouble with Spring Shell? We want to help!

* Join our GitHub Discussion section and post your question there.

== Reporting Issues
Spring Shell uses GitHub's integrated issue tracking system to record bugs and feature requests.
If you want to raise an issue, please follow the recommendations below:

* Before you log a bug, please search the {github}/issues[issue tracker] to see if someone has already reported the problem.
* If the issue doesn't already exist, {github}/issues/new[create a new issue].
* Please provide as much information as possible with the issue report.
We like to know the Spring Boot and Shell version, operating system, and JVM version you're using.
* If you need to paste code or include a stack trace, use Markdown.
+++```+++ escapes before and after your text.
* If possible, try to create a test case or project that replicates the problem and attach it to the issue.

== Building from Source

Active development branch is `main` targeting work for `3.2.x`. `3.1.x`, `3.0.x` and `2.1.x` are for maintaining current active releases.

Building and running tests:

```
./gradlew build
```

Publishing to local maven cache:

```
./gradlew publishToMavenLocal
```

== Example
https://github.com/spring-projects/spring-shell/tree/main/spring-shell-samples/[Samples] contains various examples how to use `spring-shell`.

```
./gradlew :spring-shell-samples:spring-shell-sample-catalog:build -x test
./gradlew :spring-shell-samples:spring-shell-sample-commands:build -x test
./gradlew :spring-shell-samples:spring-shell-sample-e2e:build -x test
```

Native build can be enabled using property `-PspringShellSampleNative=true`. On linux a `musl` can be activated with `-PspringShellSampleMusl=true`. Note that musl needs to be properly configured in the environment.

== License
Spring Shell is Open Source software released under the https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license].
Description
No description provided
Readme 9.2 MiB
Languages
Java 100%