|
25 | 25 | - **Flex**: Mixed fixed/proportional layouts. |
26 | 26 | - **Grid**: 12-column dynamic grid system. |
27 | 27 | - **Absolutes**: Exact coordinates when needed. |
| 28 | +- **🌐 SSH / Remote Apps**: Turn any TUI into a zero-install SSH accessible application (multi-tenant support). |
28 | 29 | - **📊 Rich Widgets**: |
29 | 30 | - **Charts**: BarChart, StackedBarChart, PieChart, DonutChart, RadarChart (Spider), FunnelChart, TreeMap, Sparkline, Plot (Scatter/Line). |
30 | 31 | - **Gauges**: Gauge, LineGauge (with pixel-perfect Braille/Block styles). |
|
45 | 46 | | **Pixel-Perfect** | **Yes** (Braille/Block/Space) | No | |
46 | 47 | | **Mouse Support** | **Full** (Wheel/Click/Drag) | Click | |
47 | 48 | | **TrueColor** | **Yes** | No | |
| 49 | +| **SSH / Multi-User** | **Native** (Backend API) | No (Global State) | |
48 | 50 | | **Modern Terminal Support** | **All** (iterm, ghostty, etc.) | No | |
49 | 51 |
|
50 | 52 | ## 📦 Installation |
@@ -138,6 +140,7 @@ Run individual examples: `go run _examples/<name>/main.go` |
138 | 140 | | **Radarchart** | <img src="_examples/radarchart/screenshot.png" height="80" /> | [View Example Code](_examples/radarchart/main.go) | |
139 | 141 | | **Scrollbar** | <img src="_examples/scrollbar/screenshot.png" height="80" /> | [View Example Code](_examples/scrollbar/main.go) | |
140 | 142 | | **Sparkline** | <img src="_examples/sparkline/screenshot.png" height="80" /> | [View Example Code](_examples/sparkline/main.go) | |
| 143 | +| **SSH Dashboard** | <img src="_examples/dashboard/screenshot.png" height="80" /> | [View Example Code](_examples/ssh-dashboard/main.go) | |
141 | 144 | | **Stacked Barchart** | <img src="_examples/stacked_barchart/screenshot.png" height="80" /> | [View Example Code](_examples/stacked_barchart/main.go) | |
142 | 145 | | **Table** | <img src="_examples/table/screenshot.png" height="80" /> | [View Example Code](_examples/table/main.go) | |
143 | 146 | | **Tabs** | <img src="_examples/tabs/screenshot.png" height="80" /> | [View Example Code](_examples/tabs/main.go) | |
@@ -172,6 +175,29 @@ for e := range uiEvents { |
172 | 175 | } |
173 | 176 | ``` |
174 | 177 |
|
| 178 | +### 🌐 Serving over SSH |
| 179 | + |
| 180 | +You can easily serve your TUI over SSH (like standard CLI apps) using `ui.InitWithConfig` and a library like `gliderlabs/ssh`. |
| 181 | + |
| 182 | +```go |
| 183 | +func sshHandler(sess ssh.Session) { |
| 184 | + // 1. Create a custom backend for this session |
| 185 | + app, _ := ui.NewBackend(&ui.InitConfig{ |
| 186 | + CustomTTY: sess, // ssh.Session implements io.ReadWriter |
| 187 | + }) |
| 188 | + defer app.Close() |
| 189 | + |
| 190 | + // 2. Use the app instance instead of global ui.* functions |
| 191 | + p := widgets.NewParagraph() |
| 192 | + p.Text = "Hello SSH User!" |
| 193 | + p.SetRect(0, 0, 20, 5) |
| 194 | + |
| 195 | + app.Render(p) // Renders to the SSH client only! |
| 196 | +} |
| 197 | +``` |
| 198 | + |
| 199 | +Check `_examples/ssh-dashboard` for a full multi-user demo. |
| 200 | + |
175 | 201 | ## 🤝 Contributing |
176 | 202 |
|
177 | 203 | Contributions are welcome! Please submit a Pull Request. |
|
0 commit comments