终端用户界面的丰富的交互式 Widget
该 Go 包提供了基于终端的用户界面所需的常用组件。
其中,这些组件有:
- 输入表单(包括输入/密码字段、下拉选择、复选框和按钮)。
- 可导航的多色文本视图
- 先进的可导航的表格视图
- 灵活的树形视图
- 可选择的名单
- 网格、Flexbox 和页面布局
- 模态信息窗口
- 应用包装器
它们有很多定制选项,可以很容易地扩展到适合你的需求。
安装
go get github.com/rivo/tview
Hello World
这个基本示例创建了一个名为 Hello, World!并显示在终端上
package main import ( "github.com/rivo/tview" ) func main() { box := tview.NewBox().SetBorder(true).SetTitle("Hello, world!") if err := tview.NewApplication().SetRoot(box, true).Run(); err != nil { panic(err) } }
查看 GitHub Wiki 上的更多例子和截图。或者试试 "demo" 子目录下的例子。
如果想看这个软件包的演示,请编译并运行 "demo/presentation" 子目录中的程序。
使用 tview 的项目
- Window manager for
tview
- Password manager
- CLI bookmark manager
- A caving database interface written in Go
- App for rental of electic bikes
- Interactive file browse and exec any command.
- A simple CRM
- Terminal UI for todist
- Graphical kubectl wrapper
- Decred Decentralized Exchange
- Kubernetes CLI To Manage Your Clusters In Style!
- A CLI file browser for Raspberry PI
- A tool to manage projects.
- A simple app for BMI monitoring
- Stream TIDAL from command line
- Secure solution for fully decentralized password management
- A growing collection of convenient little tools to work with systemd services
- A terminal based browser for Redis written in Go
- First project for the Computer Networks course.
- CLI tool build in Golang for managing ssh connection
- Test your typing speed in the terminal!
- TUI Client for Docker
- SSH client using certificates signed by HashiCorp Vault
- A go terminal based pos software.
- VMware vCenter Text UI
- Bookmarks on terminal
- A UDP testing utility
- A simple Kanban board for your terminal
- The personal information dashboard for your terminal.
- MySQL database to Golang struct
- Cryptowatch Go SDK
- Discord, TUI and SIXEL.
文档
参考 https://pkg.go.dev/github.com/rivo/tview 获取软件包的文档。
依赖性
这个软件包基于 github.com/gdamore/tcell(及其依赖项)以及 github.com/rivo/uniseg。
您的反馈
在 GitHub 上添加您的问题。如果您有任何问题,请随时联系我们。