Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/teverett/krepl

A simple framework for creating Java REPLs
https://github.com/teverett/krepl

java repl

Last synced: 24 days ago
JSON representation

A simple framework for creating Java REPLs

Awesome Lists containing this project

README

        

![CI](https://github.com/teverett/krepl/workflows/CI/badge.svg)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ea088223d07242f196809250a2d255e9)](https://www.codacy.com/app/teverett/krepl?utm_source=github.com&utm_medium=referral&utm_content=teverett/krepl&utm_campaign=Badge_Grade)
[![DepShield Badge](https://depshield.sonatype.org/badges/teverett/krepl/depshield.svg)](https://depshield.github.io)

K-REPL
===

K-REPL is a simple framework for building command-line REPLs in Java

Maven coordinates
---

```
com.khubla.krepl
krepl
1.2.0
jar
```

Adding Commands
---

To add a command, simply implement a class which extends `AbstractCommandImpl`. K-Repl will automatically find the class and add the command to the REPL.

Running the REPL
---

Simply instantiate the REPL class and call the method `repl()`

```
REPL repl = new REPL();
repl.repl();
```

It is possible to pass command strings directly to the repl via the `REPL.executeCommmandString()` API.