Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ajalt/mordant
Multiplatform text styling for Kotlin command-line applications
https://github.com/ajalt/mordant
ansi ansi-colors color console kotlin terminal
Last synced: 5 days ago
JSON representation
Multiplatform text styling for Kotlin command-line applications
- Host: GitHub
- URL: https://github.com/ajalt/mordant
- Owner: ajalt
- License: apache-2.0
- Created: 2017-09-25T02:22:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-08-10T18:24:27.000Z (5 months ago)
- Last Synced: 2024-08-11T09:12:36.361Z (5 months ago)
- Topics: ansi, ansi-colors, color, console, kotlin, terminal
- Language: Kotlin
- Homepage: https://ajalt.github.io/mordant/
- Size: 8.5 MB
- Stars: 939
- Watchers: 11
- Forks: 34
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-kotlin-multiplatform - Mordant - Multiplatform text styling for Kotlin command-line applications (Libraries / Command Line Interface)
README
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## Documentation
The full documentation can be found on [the website](https://ajalt.github.io/mordant/).
## Installation
Mordant is distributed through Maven Central.
```groovy
dependencies {
implementation("com.github.ajalt.mordant:mordant:3.0.1")// optional extensions for running animations with coroutines
implementation("com.github.ajalt.mordant:mordant-coroutines:3.0.1")// optional widget for rendering Markdown
implementation("com.github.ajalt.mordant:mordant-markdown:3.0.1")
}
```On JVM, there are more granular dependencies available.
[See the docs for details](https://ajalt.github.io/mordant/guide/).###### If you're using Maven instead of Gradle, use `mordant-jvm`
#### Snapshots
Snapshot builds are also available
You'll need to add the Sonatype snapshots repository:```kotlin
repositories {
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
}
```## License
Copyright 2018 AJ Alt
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.