
Library facilitates terminal control using ANSI escape sequences, offering type-safe DSL for text styling, color manipulation, cursor movement, screen erasing, and scrolling functionalities.
ANSI-KMP is a Kotlin Multiplatform library for working with ANSI escape sequences, which are used for terminal control such as text styling, cursor movement, and screen manipulation.
Add the dependency to your build.gradle.kts file:
dependencies {
implementation("io.github.stream29:ansi-kmp:1.0.0")
}AnsiControlSequence.Sgr - Select Graphic Rendition parameters for text styling and basic colorsAnsiControlSequence.RichSgr - Advanced color support (RGB and indexed colors)AnsiControlSequence.Cursor - Cursor movement and positioningAnsiControlSequence.Erase - Screen and line erasingAnsiControlSequence.Scroll - Screen scrollingThe AnsiConstants object provides constants for all standard ANSI escape sequence codes:
csi - Control Sequence Introducer (ESC [)sgr - Select Graphic Rendition (m)background, foreground - SGR color mode selectorsindexedColor, rgbColor - SGR color parameter selectorscursorUp, cursorDown, cursorForward, etc.eraseInDisplay, eraseInLine
scrollUp, scrollDown
ANSI-KMP is a Kotlin Multiplatform library for working with ANSI escape sequences, which are used for terminal control such as text styling, cursor movement, and screen manipulation.
Add the dependency to your build.gradle.kts file:
dependencies {
implementation("io.github.stream29:ansi-kmp:1.0.0")
}AnsiControlSequence.Sgr - Select Graphic Rendition parameters for text styling and basic colorsAnsiControlSequence.RichSgr - Advanced color support (RGB and indexed colors)AnsiControlSequence.Cursor - Cursor movement and positioningAnsiControlSequence.Erase - Screen and line erasingAnsiControlSequence.Scroll - Screen scrollingThe AnsiConstants object provides constants for all standard ANSI escape sequence codes:
csi - Control Sequence Introducer (ESC [)sgr - Select Graphic Rendition (m)background, foreground - SGR color mode selectorsindexedColor, rgbColor - SGR color parameter selectorscursorUp, cursorDown, cursorForward, etc.eraseInDisplay, eraseInLine
scrollUp, scrollDown