termui
is a cross-platform, easy-to-compile, and fully-customizable terminal dashboard built on top of termbox-go. It is inspired by blessed-contrib and written purely in Go.
termui is currently undergoing some API changes so make sure to check the changelog when upgrading
Installing from the master branch is recommended:
go get -u github.com/gizak/termui@master
package main
import ui "github.com/gizak/termui"
func main() {
err := ui.Init()
if err != nil {
panic(err)
}
defer ui.Close()
p := ui.NewParagraph("Hello World!")
p.Width = 25
p.Height = 5
ui.Render(p)
for {
e := <-ui.PollEvent()
if e.Type == ui.KeyboardEvent {
return
}
}
}
Click image to see the corresponding demo codes.
Examples can be found in _examples. Run with go run _examples/...
or run all of them consecutively with ./scripts/run_examples.py
.
This library is under the MIT License