Need help with termui?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

gizak
11.3K Stars 723 Forks MIT License 393 Commits 86 Opened issues

Description

Golang terminal dashboard

Services available

!
?

Need anything else?

Contributors list

# 8,229
gtk
fish-sh...
osx
golang
103 commits
# 29,822
Go
Shell
hugo-th...
static-...
89 commits
# 66,214
Go
HTML
Firefox
mozilla
22 commits
# 1,044
C#
Jenkins
css-fra...
schema-...
9 commits
# 124,510
Go
Shell
Markdow...
entity-...
6 commits
# 113,019
pytorch
Go
C++
ctc
6 commits
# 115,094
Go
raylib
Raspber...
C
5 commits
# 3,723
viml
golang
ag
q
5 commits
# 150,379
Go
Python
4 commits
# 149,340
GraphQL
Go
vault
hashico...
4 commits
# 150,061
Go
Python
4 commits
# 140,947
Go
mesos
Shell
Kuberne...
4 commits
# 7,468
Node.js
D
sniffer
Redis
3 commits
# 9,929
Go
pandas
scikit-...
matplot...
3 commits
# 5,490
Go
golang
Docker
command...
2 commits
# 23,741
aws-s3
Apache ...
bucket
awk
2 commits
# 161,693
HTML
Go
Shell
dubbo
2 commits
# 26,923
Go
golang
vagrant...
gRPC
2 commits
# 37,968
Common ...
Google
pipelin...
Jenkins
2 commits
# 130,045
Go
Python
command...
Shell
1 commit

termui

demo cast under osx 10.10; Terminal.app; Menlo Regular 12pt.)

termui is a cross-platform and fully-customizable terminal dashboard and widget library built on top of termbox-go. It is inspired by blessed-contrib and tui-rs and written purely in Go.

Features

  • Several premade widgets for common use cases
  • Easily create custom widgets
  • Position widgets either in a relative grid or with absolute coordinates
  • Keyboard, mouse, and terminal resizing events
  • Colors and styling

Installation

Go modules

It is not necessary to

go get
termui, since Go will automatically manage any imported dependencies for you. Do note that you have to include
/v3
in the import statements as shown in the 'Hello World' example below.

Dep

Add with

dep ensure -add github.com/gizak/termui
. With Dep,
/v3
should not be included in the import statements.

Hello World

package main

import ( "log"

ui "github.com/gizak/termui/v3"
"github.com/gizak/termui/v3/widgets"

)

func main() { if err := ui.Init(); err != nil { log.Fatalf("failed to initialize termui: %v", err) } defer ui.Close()

p := widgets.NewParagraph()
p.Text = "Hello World!"
p.SetRect(0, 0, 25, 5)

ui.Render(p)

for e := range ui.PollEvents() {
    if e.Type == ui.KeyboardEvent {
        break
    }
}

}

Widgets

Run an example with

go run _examples/{example}.go
or run each example consecutively with
make run-examples
.

Documentation

Uses

Related Works

License

MIT

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.