GithubHelp home page GithubHelp logo

rwinch / spring-shell Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spring-projects/spring-shell

0.0 1.0 0.0 8.27 MB

Spring based shell

Home Page: http://projects.spring.io/spring-shell/

License: Apache License 2.0

JavaScript 0.02% Java 97.82% TypeScript 2.12% StringTemplate 0.05%

spring-shell's Introduction

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:

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:

$ 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:

$ 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.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

Sample is a current demonstration how to use spring-shell.

License

Spring Shell is Open Source software released under the Apache 2.0 license.

spring-shell's People

Contributors

jvalkeal avatar ericbottard avatar leejianwei avatar markpollack avatar spring-builds avatar rwinch avatar camilojc avatar spring-operator avatar baybatu avatar klr8 avatar github-actions[bot] avatar onobc avatar rweisleder avatar pidster avatar danielsoro avatar wilkinsona avatar adityakishore avatar nhomble avatar jongwooo avatar guang384 avatar cachescrubber avatar altus34 avatar eubnara avatar tim-patterson avatar terminalsin avatar sualeh avatar simonverhoeven avatar selimhorri avatar robertbachmann avatar houseofdouglas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.