Class Console
java.lang.Object
cloud.kitelang.cli.console.Console
Central console output utility for consistent terminal rendering.
Uses JLine terminal when available, falls back to System.out.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns text wrapped in bold.static voidPrints lines surrounded by a box using Unicode box-drawing characters.static voidMoves cursor up and clears the line.static StringReturns text wrapped in cyan.static voidPrints an error message with red X.static org.jline.terminal.TerminalReturns the shared JLine terminal instance.static StringReturns text wrapped in green.static voidPrints a header with underline.static voidPrints an info message.static booleanChecks if the terminal supports interactive mode.static voidPrints without newline.static voidPrints formatted string.static voidprintln()Prints an empty line.static voidPrints a line to the console.static StringReturns text wrapped in red.static voidPrints a success message with green checkmark.static voidPrints a warning message with yellow indicator.static StringReturns text wrapped in yellow.
-
Method Details
-
println
Prints a line to the console. -
println
public static void println()Prints an empty line. -
print
Prints without newline. -
printf
-
success
Prints a success message with green checkmark. -
error
Prints an error message with red X. -
warning
Prints a warning message with yellow indicator. -
info
Prints an info message. -
header
Prints a header with underline. -
bold
-
green
-
red
-
yellow
-
cyan
-
clearPreviousLine
public static void clearPreviousLine()Moves cursor up and clears the line. -
getTerminal
public static org.jline.terminal.Terminal getTerminal()Returns the shared JLine terminal instance. Use this to avoid creating multiple terminals. -
isInteractive
public static boolean isInteractive()Checks if the terminal supports interactive mode. -
box
Prints lines surrounded by a box using Unicode box-drawing characters.- Parameters:
lines- The lines to display inside the box
-