Skip to content
Pure Go termbox implementation
Go Python
Find file
Latest commit 362329b Jan 23, 2016 @nsf Fix windows build.
Failed to load latest commit information.
_demos Fix cursor's behavior Jan 23, 2016
AUTHORS Add AUTHORS, change copyright notice accordingly. Oct 13, 2012
LICENSE Add AUTHORS, change copyright notice accordingly. Oct 13, 2012
README.md Add example project Dec 28, 2015
api.go Update documentation on InputMouse input mode. Jan 16, 2016
api_common.go Implement more advanced mouse handling (windows support is TBD). Jan 16, 2016
api_windows.go Update documentation on InputMouse input mode. Jan 16, 2016
collect_terminfo.py Add a small built-in terminfo database as last fallback variant. Oct 28, 2012
syscalls.go Fix darwin build (amd64 only at the moment). Mar 16, 2012
syscalls_darwin.go Fix accidental too-relaxed build constraint Nov 24, 2015
syscalls_darwin_amd64.go Fix darwin build (amd64 only at the moment). Mar 15, 2012
syscalls_freebsd.go impl. basic click event Dec 13, 2013
syscalls_linux.go Fix darwin build (amd64 only at the moment). Mar 15, 2012
syscalls_netbsd.go Add NetBSD syscalls. Feb 22, 2015
syscalls_openbsd.go impl. basic click event Dec 14, 2013
syscalls_windows.go Proper event producer shutdown (this time for sure) and gofmt. Dec 20, 2014
termbox.go Coordinates in extended modes start with 1. Make them zero-based. Jan 16, 2016
termbox_common.go Use github.com/mattn/go-runewidth library. Jul 15, 2014
termbox_windows.go Fix windows build. Jan 23, 2016
terminfo.go Implement more advanced mouse handling (windows support is TBD). Jan 16, 2016
terminfo_builtin.go Implement more advanced mouse handling (windows support is TBD). Jan 16, 2016

README.md

Termbox

Termbox is a library that provides a minimalistic API which allows the programmer to write text-based user interfaces. The library is crossplatform and has both terminal-based implementations on *nix operating systems and a winapi console based implementation for windows operating systems. The basic idea is an abstraction of the greatest common subset of features available on all major terminals and other terminal-like APIs in a minimalistic fashion. Small API means it is easy to implement, test, maintain and learn it, that's what makes the termbox a distinct library in its area.

Installation

Install and update this go package with go get -u github.com/nsf/termbox-go

Examples

For examples of what can be done take a look at demos in the _demos directory. You can try them with go run: go run _demos/keyboard.go

There are also some interesting projects using termbox-go:

  • godit is an emacsish lightweight text editor written using termbox.
  • gomatrix connects to The Matrix and displays its data streams in your terminal.
  • gotetris is an implementation of Tetris.
  • sokoban-go is an implementation of sokoban game.
  • hecate is a hex editor designed by Satan.
  • httopd is top for httpd logs.
  • mop is stock market tracker for hackers.
  • termui is a terminal dashboard.
  • termloop is a terminal game engine.
  • xterm-color-chart is a XTerm 256 color chart.
  • gocui is a minimalist Go library aimed at creating console user interfaces.
  • dry is an interactive cli to manage Docker containers.

API reference

godoc.org/github.com/nsf/termbox-go

Something went wrong with that request. Please try again.