public String readLine() {
		ExecutorService ex = Executors.newSingleThreadExecutor();
		String input = null;
		try {
			// start working
			for (int i = 0; i < tries; i++) {
				Future<String> result = null;
				try {
					result = ex.submit(readerTask());
					input = result.get(timeout, unit);
					break;
				} catch (ExecutionException | IOException e) {
					Util.verboseMsg("Error accessing console", e);
				} catch (TimeoutException e) {
					result.cancel(true);
				} catch (InterruptedException ie) {
					throw new RuntimeException(ie);
				}
			}
		} finally {
			ex.shutdownNow();
		}
		return input;
	}
Returns a ConsoleInput based upon /dev/tty which only works on Linux and Mac.
src/main/java/dev/jbang/util/ConsoleInput.java