2021-01-28 22:24:07 -05:00
2020-11-19 15:48:17 -05:00
2021-01-28 22:24:07 -05:00
2021-01-28 22:24:07 -05:00
2020-09-03 13:59:55 -04:00
2021-01-28 22:24:07 -05:00
2021-01-28 22:24:07 -05:00
2020-12-30 21:50:22 -05:00
2020-09-25 14:21:21 -04:00
2020-09-03 13:59:55 -04:00
2021-01-28 22:24:07 -05:00
2020-11-20 22:20:04 -05:00
2020-09-03 13:59:55 -04:00
2020-09-03 13:59:55 -04:00
2020-09-23 21:41:47 -04:00
2020-11-21 01:38:38 -05:00
2020-11-21 01:38:38 -05:00

Mosaic

Jetpack Compose for console UI. Inspired by Ink.

Usage

fun main() = runMosaic {
  setContent {
    Text("Hello, World!")
  }
}

Run work inside the runMosaic block after calling setContent. The output will automatically update as you alter shared state.

Examples

Run ./gradlew installDist to build the example binaries.

  • Counter: A simple increasing number from 0 until 20.

    ./examples/counter/build/install/counter/bin/counter

  • Jest: Example output of a test framework (such as JS's 'Jest').

    ./examples/jest/build/install/jest/bin/jest

  • Robot: An interactive, game-like program with keyboard control.

    ./examples/robot/build/install/robot/bin/robot

License

Copyright 2020 Jake Wharton

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 at

   http://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.
Description
Build terminal UI in Kotlin using Jetpack Compose
Readme 16 MiB
Languages
Kotlin 84.9%
C 8.4%
C++ 5.7%
Java 0.7%
Zig 0.2%