-
Notifications
You must be signed in to change notification settings - Fork 15
v4.1.9 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v4.1.9 #2
Changes from all commits
20d86d1
e53456e
db83b24
824ef2c
5f2e3d9
4150ff6
c3c9202
9e6c0eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,7 @@ | |
| .vscode/ | ||
| .mypy_cache/ | ||
| .idea | ||
| hostkey | ||
| hostkey.pub | ||
| .pub | ||
| ssh_dashboard | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -25,6 +25,7 @@ | |||||||||||||||||||||
| - **Flex**: Mixed fixed/proportional layouts. | ||||||||||||||||||||||
| - **Grid**: 12-column dynamic grid system. | ||||||||||||||||||||||
| - **Absolutes**: Exact coordinates when needed. | ||||||||||||||||||||||
| - **🌐 SSH / Remote Apps**: Turn any TUI into a zero-install SSH accessible application (multi-tenant support). | ||||||||||||||||||||||
| - **📊 Rich Widgets**: | ||||||||||||||||||||||
| - **Charts**: BarChart, StackedBarChart, PieChart, DonutChart, RadarChart (Spider), FunnelChart, TreeMap, Sparkline, Plot (Scatter/Line). | ||||||||||||||||||||||
| - **Gauges**: Gauge, LineGauge (with pixel-perfect Braille/Block styles). | ||||||||||||||||||||||
|
|
@@ -45,6 +46,7 @@ | |||||||||||||||||||||
| | **Pixel-Perfect** | **Yes** (Braille/Block/Space) | No | | ||||||||||||||||||||||
| | **Mouse Support** | **Full** (Wheel/Click/Drag) | Click | | ||||||||||||||||||||||
| | **TrueColor** | **Yes** | No | | ||||||||||||||||||||||
| | **SSH / Multi-User** | **Native** (Backend API) | No (Global State) | | ||||||||||||||||||||||
| | **Modern Terminal Support** | **All** (iterm, ghostty, etc.) | No | | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## 📦 Installation | ||||||||||||||||||||||
|
|
@@ -138,6 +140,7 @@ Run individual examples: `go run _examples/<name>/main.go` | |||||||||||||||||||||
| | **Radarchart** | <img src="_examples/radarchart/screenshot.png" height="80" /> | [View Example Code](_examples/radarchart/main.go) | | ||||||||||||||||||||||
| | **Scrollbar** | <img src="_examples/scrollbar/screenshot.png" height="80" /> | [View Example Code](_examples/scrollbar/main.go) | | ||||||||||||||||||||||
| | **Sparkline** | <img src="_examples/sparkline/screenshot.png" height="80" /> | [View Example Code](_examples/sparkline/main.go) | | ||||||||||||||||||||||
| | **SSH Dashboard** | <img src="_examples/dashboard/screenshot.png" height="80" /> | [View Example Code](_examples/ssh-dashboard/main.go) | | ||||||||||||||||||||||
| | **Stacked Barchart** | <img src="_examples/stacked_barchart/screenshot.png" height="80" /> | [View Example Code](_examples/stacked_barchart/main.go) | | ||||||||||||||||||||||
| | **Table** | <img src="_examples/table/screenshot.png" height="80" /> | [View Example Code](_examples/table/main.go) | | ||||||||||||||||||||||
| | **Tabs** | <img src="_examples/tabs/screenshot.png" height="80" /> | [View Example Code](_examples/tabs/main.go) | | ||||||||||||||||||||||
|
|
@@ -172,6 +175,29 @@ for e := range uiEvents { | |||||||||||||||||||||
| } | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### 🌐 Serving over SSH | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| You can easily serve your TUI over SSH (like standard CLI apps) using `ui.InitWithConfig` and a library like `gliderlabs/ssh`. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```go | ||||||||||||||||||||||
| func sshHandler(sess ssh.Session) { | ||||||||||||||||||||||
| // 1. Create a custom backend for this session | ||||||||||||||||||||||
| app, _ := ui.NewBackend(&ui.InitConfig{ | ||||||||||||||||||||||
| CustomTTY: sess, // ssh.Session implements io.ReadWriter | ||||||||||||||||||||||
| }) | ||||||||||||||||||||||
|
Comment on lines
+185
to
+187
|
||||||||||||||||||||||
| app, _ := ui.NewBackend(&ui.InitConfig{ | |
| CustomTTY: sess, // ssh.Session implements io.ReadWriter | |
| }) | |
| app, err := ui.NewBackend(&ui.InitConfig{ | |
| CustomTTY: sess, // ssh.Session implements io.ReadWriter | |
| }) | |
| if err != nil { | |
| // handle error appropriately, e.g., log or return | |
| return | |
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,20 @@ | ||||||
| # SSH Dashboard Example | ||||||
|
|
||||||
| This example demonstrates the **SSH Dashboard** widget/feature. | ||||||
|
||||||
| This example demonstrates the **SSH Dashboard** widget/feature. | |
| This example demonstrates serving a gotui dashboard over SSH. |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command references the wrong example path. It should reference ssh-dashboard/main.go instead of stacked_barchart/main.go.
| $ go run _examples/stacked_barchart/main.go | |
| $ go run _examples/ssh-dashboard/main.go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The image reference points to
_examples/dashboard/screenshot.pngbut this is for the SSH Dashboard example. The path should likely be_examples/ssh-dashboard/screenshot.pngto match the example's actual directory name.