Write purely functional, type-safe terminal apps using The Elm Architecture. Easily create complex, responsive UIs with an interface inspired by elm-ui. All in the very pleasant 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 start writing your app!
Feel free to reach out if you need help, or to show off what you're building. I'd love to see it! See below for contact info.
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.
If you have questions, suggestions, find a bug, or want to follow updates to the package, you can:
- Follow me on mastodon at @blaix@hachyderm.io.
- Join the
#gren-tui
channel on the gren discord. - File an issue on github.