public static ConsoleInput get(int tries, int timeout, TimeUnit unit) {
		if (Util.haveConsole()) {
			return stdin(tries, timeout, unit);
		} else if (!Util.isWindows() && haveTTY()) {
			return tty(tries, timeout, unit);
		} else {
			return null;
		}
	}
Will either return a ConsoleInput that enables reading a line from the
console (using stdin or a tty) or it will return <code>null</code> if no
console is available.
src/main/java/dev/jbang/util/ConsoleInput.java