# termui [![Build Status](https://travis-ci.org/gizak/termui.svg?branch=master)](https://travis-ci.org/gizak/termui) [![Doc Status](https://godoc.org/github.com/gizak/termui?status.png)](https://godoc.org/github.com/gizak/termui) demo cast under osx 10.10; Terminal.app; Menlo Regular 12pt.) `termui` is a cross-platform, easy-to-compile, and fully-customizable terminal dashboard built on top of [termbox-go](https://github.com/nsf/termbox-go). It is inspired by [blessed-contrib](https://github.com/yaronn/blessed-contrib) and written purely in Go. **termui is currently undergoing some API changes so make sure to check the changelog when upgrading** ## Installation Installing from the master branch is recommended: ```bash go get -u github.com/gizak/termui@master ``` ## Usage ### Hello World ```go 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") ui.Render(p) for { e := <-ui.PollEvent() switch e.ID { case "q", "": return } } } ``` ### Widgets Click image to see the corresponding demo codes. [barchart](https://github.com/gizak/termui/blob/master/_examples/barchart.go) [gauge](https://github.com/gizak/termui/blob/master/_examples/gauge.go) [linechart](https://github.com/gizak/termui/blob/master/_examples/linechart.go) [list](https://github.com/gizak/termui/blob/master/_examples/list.go) [paragraph](https://github.com/gizak/termui/blob/master/_examples/par.go) [sparklines](https://github.com/gizak/termui/blob/master/_examples/sparklines.go) [stackedbarchart](https://github.com/gizak/termui/blob/master/_examples/mbarchart.go) [table](https://github.com/gizak/termui/blob/master/_examples/table.go) ### Examples Examples can be found in [\_examples](./_examples). Run with `go run _examples/...` or run all of them consecutively with `./scripts/run_examples.py`. ## Documentation - [godoc](https://godoc.org/github.com/gizak/termui) for code documentation - [wiki](https://github.com/gizak/termui/wiki) for general information ## Uses - [go-ethereum/monitorcmd](https://github.com/ethereum/go-ethereum/blob/96116758d22ddbff4dbef2050d6b63a7b74502d8/cmd/geth/monitorcmd.go) ## Related Works - [blessed-contrib](https://github.com/yaronn/blessed-contrib) - [tui-rs](https://github.com/fdehau/tui-rs) - [gocui](https://github.com/jroimartin/gocui) ## License This library is under the [MIT License](http://opensource.org/licenses/MIT)