color
Rich Interactive Widgets for Terminal UIs
Our great sponsors
color | Rich Interactive Widgets for Terminal UIs | |
---|---|---|
8 | 23 | |
6,974 | 9,650 | |
- | - | |
6.6 | 8.0 | |
1 day ago | 6 days ago | |
Go | Go | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
color
-
Snob - Dev Log (How it's done)
printer.go - Handles printing (showing) information to the user. This is where fatih/color is being used, so we can print pretty information with colors.
-
Simple CLI Colorizing in Go
Note, you also need to handle piping to other programs or sending output to a file. See the logic in https://github.com/fatih/color/blob/master/color.go, https://github.com/mattn/go-colorable and https://github.com/mattn/go-isatty.
-
Platform agnostic way to delete a line in the console?
The platform I'm using is Windows, and I found that prior to Win10 there was no support for ANSI escape codes in the command line, but I have Win10 and am pretty sure my version is up-to-date enough to have this support. I have also been successfully using Fatih's color package, so I had assumed that the escape codes were working. But they are not working when I do it manually, so fmt.Print("\033[F") does not work.
-
First Go program - would love criticism: a small program that outputs VPN status, IP and emoji-flag
I would use bytes.Contains instead of string.Contains and I would use github.com/fatih/color for ansi colours rather than re-implienting it yourself. Best not to call log.Fatal in functions other than main - it makes testing hard. Instead they should return an error after their main return value.
-
ColorStyle is a library of styles for command-line text.
What’s the benefit over a well established library such as https://github.com/fatih/color ?
Rich Interactive Widgets for Terminal UIs
-
What are some good projects in Go for an experienced dev?
I've had fun writing an app with https://github.com/rivo/tview.
-
Picnic-TUI - Where Go and Groceries Create a Command-Line Feast
Spotify-TUI was developed in Rust, therefore I couldn’t simply use the same UI framework. Within Go a popular choice is tview https://github.com/rivo/tview which provides many similar UI widgets which covered all my needs.
-
GoLang — Simplifying Complexity “The Beginning”
. Web backend (with various frameworks available) . Web Assembly (one of them is vugu framework) . Microservices (some frameworks: Go Micro, Go Kit, Gizmo, Kite) . Fragments services (Term mentioned by @jeffotoni in a microservices discussion group) . Lambdas (FaaS example) . Client Server . Terminal applications (using the tview lib) . IoT (some frameworks) . Bots (some here) . Client Applications using Web technology . Desktop using Qt+QML, Native Win Lib (example Qt, Qt widgets, Qml) . Network Applications . Protocol applications . REST Applications . SOAP Applications . GraphQL Applications . RPC Applications . TCP Applications . gRPC Applications . WebSocket Applications . GopherJS (compiles Go to JavaScript)
-
Recommendations on building a simple DSL REPL?
The jist of what I did: The TUI lib I used was https://github.com/rivo/tview. While technically a TUI, it didn't look like one. Tui gave me components for user input, context-aware output formatting, and configurable hotkeys and command shortcuts. History was just an in-memory string map bound to a hotkey.
-
Help to find a terminal library
tview is built on top of the tcell library mentioned in another comment. I liked it so much that I forked it as cview.
-
Ramen has reached v0.2.0, the first production-ready version (in my opinion)
It's tview, the same framework underlying awesome k9s project.
- Equivalent to Pythons Rich?
-
WhatsApp in the terminal
A tui client for WhatsApp. My first ever go project!!! As a very slow learner I am really proud of how far I could bullshit my way through it. I used tview and whatsmeow for this.
-
Need a TUI with multiline text input or good interactive CLI-interface style support
After a user request cycle, however, the tview textarea widget is now in active development so stay tuned!
Did you look at tview?
What are some alternatives?
bubbletea - A powerful little TUI framework 🏗
termui - Golang terminal dashboard
gocui - Minimalist Go package aimed at creating Console User Interfaces.
go-prompt - Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.
tcell - Tcell is an alternate terminal package, similar in some ways to termbox, but better in others.
chalk - Intuitive package for prettifying terminal/console output. http://godoc.org/github.com/ttacon/chalk
tui-go
pterm - ✨ #PTerm is a modern Go module to easily beautify console output. Featuring charts, progressbars, tables, trees, text input, select menus and much more 🚀 It's completely configurable and 100% cross-platform compatible.
termbox-go - Pure Go termbox implementation
aurora - Golang ultimate ANSI-colors that supports Printf/Sprintf methods