Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcusolsson/tui-go
A UI library for terminal applications.
https://github.com/marcusolsson/tui-go
terminal terminal-app tui ui
Last synced: 3 months ago
JSON representation
A UI library for terminal applications.
- Host: GitHub
- URL: https://github.com/marcusolsson/tui-go
- Owner: marcusolsson
- License: mit
- Archived: true
- Created: 2016-11-17T09:31:56.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-10-12T20:26:05.000Z (about 3 years ago)
- Last Synced: 2024-07-31T17:19:10.800Z (5 months ago)
- Topics: terminal, terminal-app, tui, ui
- Language: Go
- Size: 2.08 MB
- Stars: 2,085
- Watchers: 49
- Forks: 122
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- my-awesome - marcusolsson/tui-go - app,tui,ui pushed_at:2021-10 star:2.1k fork:0.1k A UI library for terminal applications. (Go)
- go-awesome - tui - Terminal UI (Open source library / Command Line)
README
# tui: Terminal UI for Go
[![Build Status](https://travis-ci.org/marcusolsson/tui-go.svg?branch=master)](https://travis-ci.org/marcusolsson/tui-go)
[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/marcusolsson/tui-go)
[![Go Report Card](https://goreportcard.com/badge/github.com/marcusolsson/tui-go)](https://goreportcard.com/report/github.com/marcusolsson/tui-go)
[![License MIT](https://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)](LICENSE)A UI library for terminal applications.
tui (pronounced _tooey_) provides a higher-level programming model for building rich terminal applications. It lets you build layout-based user interfaces that (should) gracefully handle resizing for you.
_IMPORTANT:_ tui-go is still in an experimental phase so please don't use it for anything other than experiments, yet.
**Update**: I created tui-go as an experiment because I wanted a simpler way of creating terminal-based user interfaces. It has since then become a project, with all the work that comes with it. While it's been really fun, unfortunately I'm no longer able to maintain this project.
Since I started working on tui-go, a number of similar projects have popped up. One that I think shows great promise is [rivo/tview](https://github.com/rivo/tview), which embodies much of what I envisioned for tui-go. I highly recommend trying it out!
Thanks all of you who have contributed and supported tui-go!
![Screenshot](example/chat/screenshot.png)
## Installation
```
go get github.com/marcusolsson/tui-go
```## Usage
```go
package mainimport "github.com/marcusolsson/tui-go"
func main() {
box := tui.NewVBox(
tui.NewLabel("tui-go"),
)ui, err := tui.New(box)
if err != nil {
panic(err)
}
ui.SetKeybinding("Esc", func() { ui.Quit() })if err := ui.Run(); err != nil {
panic(err)
}
}
```## Getting started
If you want to know what it is like to build terminal applications with tui-go, check out some of the [examples](example).
Documentation is available at [godoc.org](https://godoc.org/github.com/marcusolsson/tui-go).
Make sure you check out some of the [projects using tui-go](https://godoc.org/github.com/marcusolsson/tui-go?importers).
Once you've gotten started developing your first application with tui-go, you might be interested in learning about common [patterns](https://github.com/marcusolsson/tui-go/wiki/Patterns) or how you can [debug](https://github.com/marcusolsson/tui-go/wiki/Debugging) your applications.
## Related projects
tui-go is mainly influenced by [Qt](https://www.qt.io/) and offers a similar programming model that has been adapted to Go and the terminal.
For an overview of the alternatives for writing terminal user interfaces, check out [this article](https://appliedgo.net/tui/) by [AppliedGo](https://appliedgo.net/).
## License
tui-go is released under the [MIT License](LICENSE).
## Contact
If you're interested in chatting with users and contributors, join
[#tui-go](https://gophers.slack.com/messages/tui-go) on
the [Gophers Slack](https://gophers.slack.com).
If you're not already a part of the Slack workspace, you can join
[here](https://invite.slack.golangbridge.org/). If you prefer a lower-bandwidth
interface, see [this
article](https://get.slack.help/hc/en-us/articles/201727913-Connect-to-Slack-over-IRC-and-XMPP)
on connecting to Slack via IRC or XMPP.