Mordant is a multiplatform library for rendering styled text in the terminal. You can use it to add color and style to text, create tables, draw animations, and more.
Mordant has:
- Easy colorful ANSI output with automatic detection of terminal capabilities
- Markdown rendering directly to the terminal
- Widgets for laying out terminal output, including lists, tables, panels, and more
- Support for animating any widget, like progress bars and dashboards
Installation¶
Mordant is distributed through Maven Central.
dependencies {
implementation("com.github.ajalt.mordant:mordant:3.0.0")
// optional extensions for running animations with coroutines
implementation("com.github.ajalt.mordant:mordant-coroutines:3.0.0")
// optional widget for rendering Markdown
implementation("com.github.ajalt.mordant:mordant-markdown:3.0.0")
}
On JVM, there are more granular dependencies available. See the docs for details.