@ziuus/vanta 0.10.0 → 0.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -179
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -152,6 +152,10 @@ Every key, on screen, on any page.
|
|
|
152
152
|
| `<` `>` | Volume down / up |
|
|
153
153
|
| `?` | Help overlay |
|
|
154
154
|
| `q` | Quit |
|
|
155
|
+
| `~` / `F12` | Toggle Debug Logs overlay (`s` saves them to file) |
|
|
156
|
+
| `S` / `,` | Open Settings overlay |
|
|
157
|
+
| `Ctrl + ←/→` | Resize dashboard columns horizontally (when focused) |
|
|
158
|
+
| `Ctrl + ↑/↓` | Resize dashboard components vertically (when focused) |
|
|
155
159
|
|
|
156
160
|
**Processes (Monitor):** `↑↓ PgUp PgDn Home End` select · `/` filter (`Enter` keeps, `Esc` clears) · `s` sort field · `r` reverse · `t` tree · `←→` fold · `c` full command · `k` SIGTERM · `K` SIGKILL (press twice to confirm, `x` cancels)
|
|
157
161
|
|
|
@@ -165,185 +169,35 @@ Every key, on screen, on any page.
|
|
|
165
169
|
|
|
166
170
|
Cycle with `T` — your choice is written back to the config file.
|
|
167
171
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
Vanta is extensible through runtime WASM extensions. You can install completely new UI panels and capabilities created by the community *without* recompiling Vanta.
|
|
199
|
-
|
|
200
|
-
### 1. Discover Extensions
|
|
201
|
-
Search the community registry (hosted via the [vanta-integrations](https://github.com/ziuus/vanta-integrations) repo):
|
|
202
|
-
```bash
|
|
203
|
-
vanta search
|
|
204
|
-
```
|
|
205
|
-
```text
|
|
206
|
-
Vanta Extensions (API v0.9.1)
|
|
207
|
-
|
|
208
|
-
security Vanta Security
|
|
209
|
-
Live CVE security feeds and threat monitoring.
|
|
210
|
-
v0.1.0 (API v0.9.0) by Community
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### 2. Install & Verify
|
|
214
|
-
Install an extension. Vanta will securely download the `.wasm` artifact, verify its **SHA-256 checksum**, check API compatibility, and place it in your local extensions folder:
|
|
215
|
-
```bash
|
|
216
|
-
vanta install security
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
> 🔒 **Security Notice**: Extensions are sandboxed by default. Currently, extensions are granted UI and Configuration access, but are denied Network, Filesystem, and Process execution capabilities.
|
|
220
|
-
|
|
221
|
-
### 3. Enable in Config
|
|
222
|
-
Enable the extension so Vanta loads it on startup:
|
|
223
|
-
```bash
|
|
224
|
-
vanta enable security
|
|
225
|
-
```
|
|
226
|
-
It will automatically append to the `enabled` array in your `~/.config/vanta/config.toml`.
|
|
227
|
-
|
|
228
|
-
Start Vanta (`vanta`) and the new panel will appear in your dashboard!
|
|
229
|
-
|
|
230
|
-
### Custom Pages (No Code Required)
|
|
231
|
-
You can still build custom views natively with flexible grid layouts by defining `[[pages]]` in your config:
|
|
232
|
-
|
|
233
|
-
```toml
|
|
234
|
-
[[pages]]
|
|
235
|
-
name = "DevOps"
|
|
236
|
-
layout = [
|
|
237
|
-
["system", "network"],
|
|
238
|
-
["processes", "clock"]
|
|
239
|
-
]
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
## Custom Widgets
|
|
243
|
-
|
|
244
|
-
Add your own data panels to the Dashboard without recompiling Vanta.
|
|
245
|
-
Each `[[custom_widgets]]` entry in `config.toml` runs a command or reads a file in the background and displays the result.
|
|
246
|
-
|
|
247
|
-
### Quick examples
|
|
248
|
-
|
|
249
|
-
**Raspberry Pi voltage:**
|
|
250
|
-
|
|
251
|
-
```toml
|
|
252
|
-
[[custom_widgets]]
|
|
253
|
-
id = "pi_voltage"
|
|
254
|
-
title = "Pi Battery"
|
|
255
|
-
source = "command"
|
|
256
|
-
command = "vcgencmd measure_volts"
|
|
257
|
-
renderer = "value"
|
|
258
|
-
refresh = 2.0
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
**Raspberry Pi CPU temperature (millidegrees → degrees with min/max):**
|
|
262
|
-
|
|
263
|
-
```toml
|
|
264
|
-
[[custom_widgets]]
|
|
265
|
-
id = "pi_temp"
|
|
266
|
-
title = "CPU Temp"
|
|
267
|
-
source = "command"
|
|
268
|
-
command = "cat /sys/class/thermal/thermal_zone0/temp"
|
|
269
|
-
renderer = "gauge"
|
|
270
|
-
refresh = 2.0
|
|
271
|
-
min = 0
|
|
272
|
-
max = 100000
|
|
273
|
-
unit = "m°C"
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
**Linux battery percentage (gauge renderer):**
|
|
277
|
-
|
|
278
|
-
```toml
|
|
279
|
-
[[custom_widgets]]
|
|
280
|
-
id = "battery"
|
|
281
|
-
title = "Battery"
|
|
282
|
-
source = "file"
|
|
283
|
-
path = "/sys/class/power_supply/BAT0/capacity"
|
|
284
|
-
renderer = "gauge"
|
|
285
|
-
refresh = 1.0
|
|
286
|
-
min = 0
|
|
287
|
-
max = 100
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
**Any shell command as plain text:**
|
|
291
|
-
|
|
292
|
-
```toml
|
|
293
|
-
[[custom_widgets]]
|
|
294
|
-
id = "uptime_cmd"
|
|
295
|
-
title = "Uptime"
|
|
296
|
-
source = "command"
|
|
297
|
-
command = "uptime -p"
|
|
298
|
-
renderer = "text"
|
|
299
|
-
refresh = 10.0
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
**Docker running containers:**
|
|
303
|
-
|
|
304
|
-
```toml
|
|
305
|
-
[[custom_widgets]]
|
|
306
|
-
id = "docker_count"
|
|
307
|
-
title = "Containers"
|
|
308
|
-
source = "command"
|
|
309
|
-
command = "docker ps -q"
|
|
310
|
-
renderer = "text"
|
|
311
|
-
refresh = 5.0
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
### All options
|
|
315
|
-
|
|
316
|
-
| Key | Required | Default | Description |
|
|
317
|
-
|-----|----------|---------|-------------|
|
|
318
|
-
| `id` | ✓ | — | Unique identifier (used for focus/zoom). |
|
|
319
|
-
| `title` | ✓ | — | Panel title shown in the border. |
|
|
320
|
-
| `source` | — | `command` | `command` or `file`. |
|
|
321
|
-
| `command` | when `source = "command"` | — | Command to run (supports quoted args; no shell). |
|
|
322
|
-
| `path` | when `source = "file"` | — | File to read (e.g. `/sys/class/…`). |
|
|
323
|
-
| `renderer` | — | `value` | `value` · `text` · `gauge` · `bar` · `graph`. |
|
|
324
|
-
| `refresh` | — | `5.0` | Seconds between fetches (0.1 – 3600). |
|
|
325
|
-
| `unit` | — | none | Unit suffix appended to `value` displays (e.g. `"V"`). |
|
|
326
|
-
| `min` | — | `0` | Range minimum for `gauge` and `bar`. |
|
|
327
|
-
| `max` | — | `100` | Range maximum for `gauge` and `bar`. |
|
|
328
|
-
| `enabled` | — | `true` | Set `false` to hide without removing the entry. |
|
|
329
|
-
|
|
330
|
-
### Renderers
|
|
331
|
-
|
|
332
|
-
| Name | Shows |
|
|
333
|
-
|------|-------|
|
|
334
|
-
| `value` | Single value, centred and bold. Appends `unit` if set. |
|
|
335
|
-
| `text` | Raw text output, word-wrapped. |
|
|
336
|
-
| `gauge` | Horizontal bar `████░░ 82%` normalised to `min`/`max`. |
|
|
337
|
-
| `bar` | Horizontal bar without percentage label. |
|
|
338
|
-
| `graph` | Scrolling history graph using Vanta's block-character primitives. |
|
|
339
|
-
|
|
340
|
-
### How it works
|
|
341
|
-
|
|
342
|
-
- Each widget runs on its own background thread at its own `refresh` interval. The render loop (30 fps) only reads a cached result — it never blocks on I/O.
|
|
343
|
-
- Commands are executed directly (no `sh -c`). Arguments with spaces can be quoted: `command = 'grep -r "error" /var/log'`.
|
|
344
|
-
- Commands that hang are killed after 10 seconds. Crashed commands, missing files, and parse errors are shown as status messages (`Command failed`, `Unavailable`, `Invalid value`, `Timeout`, `Loading…`) — they never crash Vanta.
|
|
345
|
-
- Custom widgets appear as a horizontal row at the bottom of the Dashboard page. They participate in normal Tab focus and Enter zoom like any built-in panel.
|
|
346
|
-
- Set `VANTA_DEBUG=1` before running Vanta to see per-widget error messages on stderr.
|
|
172
|
+
### Custom Themes
|
|
173
|
+
|
|
174
|
+
You can easily load custom themes dynamically without recompiling Vanta.
|
|
175
|
+
|
|
176
|
+
1. Create a `themes` folder inside your config directory (e.g. `~/.config/vanta/themes/`).
|
|
177
|
+
2. Drop in a `.toml` file with your theme name (e.g., `cyberpunk.toml`).
|
|
178
|
+
3. Define your colors using hex codes:
|
|
179
|
+
```toml
|
|
180
|
+
bg = "#000000"
|
|
181
|
+
accent = "#00ff00"
|
|
182
|
+
secondary = "#ff00ff"
|
|
183
|
+
surface = "#111111"
|
|
184
|
+
text = "#ffffff"
|
|
185
|
+
dim = "#555555"
|
|
186
|
+
green = "#00ff00"
|
|
187
|
+
yellow = "#ffff00"
|
|
188
|
+
red = "#ff0000"
|
|
189
|
+
```
|
|
190
|
+
4. Press `T` in Vanta to cycle to it, or set it explicitly in your `config.toml` (`theme = "cyberpunk"`).
|
|
191
|
+
|
|
192
|
+
## Configuration & Customization
|
|
193
|
+
|
|
194
|
+
Vanta is highly configurable via `~/.config/vanta/config.toml`. You can:
|
|
195
|
+
- Change the layout, refresh rates, and themes
|
|
196
|
+
- Add your own **Custom Widgets** using shell commands or files
|
|
197
|
+
- Install community-built **WASM Extensions** to add entirely new UI panels without recompiling
|
|
198
|
+
|
|
199
|
+
For a complete guide to all configuration options, extensions, and custom widgets, please read:
|
|
200
|
+
👉 **[docs/CONFIGURATION.md](docs/CONFIGURATION.md)**
|
|
347
201
|
|
|
348
202
|
## Architecture
|
|
349
203
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ziuus/vanta",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.5",
|
|
4
4
|
"description": "Aesthetic Rust TUI system dashboard — CPU, memory, disk, network, GPU, processes, now-playing, clock, file manager, notes and visualizer in one terminal pane",
|
|
5
5
|
"bin": {
|
|
6
6
|
"vanta": "bin/vanta.js"
|