Skip to content

blaix/gren-tui

Repository files navigation

Gren TUI

Build interactive terminal apps using The Elm Architecture. Easily create complex, reactive layouts with a DSL inspired by elm-ui. Code and refactor with confidence thanks to the type-safety and purity of the Gren programming language.

Examples

menu example

source


progress bar example

source


game example

source


You can find all the example apps here.

Usage

If you haven't already, install node, install gren, and take a look at the book if you want to get up to speed with the language.

Then create a gren node application:

mkdir myapp
cd myapp
gren init --platform=node

Install the gren-tui package:

gren package install blaix/gren-tui

Then create a src/Main.gren file. For a starting point, see:

  • The example above.
  • The examples/ directory.

Then compile and run with:

gren make src/Main.gren
node app

Now what?

Check out the API docs and examples/ and start writing your app!

Feel free to reach out if you need help, have suggestions, or want to show off what you're building. I'd love to see it! You can find me:

Or you can file an issue on github. Even if you just have a question or suggestion.

Working on this package

This project uses devbox. If you install devbox and start a devbox shell (or set up direnv - highly recommended!), you will have the correct version of gren on your path, you can run tests with just test, and you can run examples with just [example-name].

If you don't want to use devbox, see devbox.json for a list of dependencies if you will need to install.