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.
You can find all the example apps here.
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
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:
- on mastodon at @[email protected].
- in the
#gren-tui
channel on the gren discord.
Or you can file an issue on github. Even if you just have a question or suggestion.
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.