@ziuus/vanta 0.2.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Noel Paul Tomy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,238 @@
1
+ <div align="center">
2
+
3
+ # vanta
4
+
5
+ **Your machine, one pane.**
6
+
7
+ A fast, aesthetic terminal system dashboard in Rust.
8
+
9
+ [![npm](https://img.shields.io/npm/v/@ziuus/vanta?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/@ziuus/vanta)
10
+ [![CI](https://img.shields.io/github/actions/workflow/status/ziuus/vanta/ci.yml?style=for-the-badge&label=CI)](https://github.com/ziuus/vanta/actions/workflows/ci.yml)
11
+ [![Release](https://img.shields.io/github/v/release/ziuus/vanta?style=for-the-badge&color=4A9E8E)](https://github.com/ziuus/vanta/releases)
12
+ [![License](https://img.shields.io/badge/License-MIT-blue?style=for-the-badge)](LICENSE)
13
+ [![Landing page](https://img.shields.io/badge/Landing_Page-030712?style=for-the-badge&logo=vercel&logoColor=white)](https://website-pi-seven-nty4ogjp2f.vercel.app)
14
+
15
+ <br />
16
+
17
+ <img src="https://raw.githubusercontent.com/ziuus/vanta/main/docs/dashboard.png" alt="vanta dashboard page" width="900" />
18
+
19
+ </div>
20
+
21
+ ---
22
+
23
+ Vanta collapses everything you care about into one terminal pane: CPU, memory, disk,
24
+ network, GPU, processes, now-playing, a block-digit clock, a calendar, and an audio
25
+ visualizer. Keyboard only. **~3 MB binary, ~2–5% CPU** at the default 30 fps.
26
+
27
+ ```bash
28
+ npm install -g @ziuus/vanta && vanta
29
+ ```
30
+
31
+ ## Install
32
+
33
+ <table>
34
+ <tr><th align="left">Method</th><th align="left">Command</th><th align="left">Notes</th></tr>
35
+ <tr>
36
+ <td><strong>npm</strong></td>
37
+ <td><code>npm install -g @ziuus/vanta</code></td>
38
+ <td>Fetches the prebuilt <code>linux-x64</code> binary. No Rust needed.</td>
39
+ </tr>
40
+ <tr>
41
+ <td><strong>Prebuilt binary</strong></td>
42
+ <td><a href="https://github.com/ziuus/vanta/releases/latest">Releases</a></td>
43
+ <td>Download the <code>tar.gz</code>, drop <code>vanta</code> on your <code>PATH</code>.</td>
44
+ </tr>
45
+ <tr>
46
+ <td><strong>cargo</strong></td>
47
+ <td><code>cargo install --git https://github.com/ziuus/vanta</code></td>
48
+ <td>Any architecture. Needs a Rust toolchain.</td>
49
+ </tr>
50
+ <tr>
51
+ <td><strong>From source</strong></td>
52
+ <td><code>git clone https://github.com/ziuus/vanta &amp;&amp; cd vanta &amp;&amp; cargo run --release</code></td>
53
+ <td>For hacking on it.</td>
54
+ </tr>
55
+ </table>
56
+
57
+ **One-liner, no install:**
58
+
59
+ ```bash
60
+ npx @ziuus/vanta
61
+ ```
62
+
63
+ The npm install puts down two commands for the same binary — `vanta` and the
64
+ shorter `vtui`. A `cargo install` gives you `vanta` only.
65
+
66
+ ### Requirements
67
+
68
+ Linux (vanta reads `/proc` and `/sys`). Building from source also needs `libdbus`:
69
+
70
+ ```bash
71
+ sudo pacman -S dbus # Arch
72
+ sudo apt install libdbus-1-dev # Debian / Ubuntu
73
+ sudo dnf install dbus-devel # Fedora
74
+ ```
75
+
76
+ Optional tools that light up extra panels — vanta degrades quietly without them:
77
+
78
+ | Tool | Unlocks |
79
+ |------|---------|
80
+ | `cava` | Audio visualizer (falls back to an idle wave) |
81
+ | `nmcli` | Wi-Fi SSID + signal strength |
82
+ | `nvidia-smi` | NVIDIA GPU utilisation, VRAM, temp |
83
+ | `docker` | Running-container count |
84
+ | `checkupdates` | Pending Arch package updates |
85
+
86
+ ## Managing vanta
87
+
88
+ ```bash
89
+ vanta --version # what am I running
90
+ vanta --help # usage + keys
91
+
92
+ npm update -g @ziuus/vanta # update (npm)
93
+ cargo install --git https://github.com/ziuus/vanta --force # update (cargo)
94
+
95
+ npm uninstall -g @ziuus/vanta # remove (npm)
96
+ cargo uninstall vanta # remove (cargo)
97
+
98
+ rm -rf ~/.config/vanta # drop config + persisted theme/page
99
+ ```
100
+
101
+ Where things live:
102
+
103
+ | Path | What |
104
+ |------|------|
105
+ | `~/.config/vanta/config.toml` | Config, plus the theme / page / visualizer vanta persists for you |
106
+ | `$(npm root -g)/@ziuus/vanta/bin/` | The npm-installed binary |
107
+ | `~/.cargo/bin/vanta` | The cargo-installed binary |
108
+
109
+ Vanta respects `XDG_CONFIG_HOME` if you set it.
110
+
111
+ ## Pages
112
+
113
+ | Key | Page | What's on it |
114
+ |-----|------|--------------|
115
+ | `1` | **Dashboard** | System facts + distro logo, semicircle gauges, CPU graph & cores, storage, big clock, now playing, visualizer, top processes, status, memory, network, calendar |
116
+ | `2` | **Monitor** | btop-style: CPU / memory / disk I/O / network / GPU graphs on top, full process table below (sort, filter, tree, kill) |
117
+ | `3` | **Aesthetic** | Huge clock, calendar, matrix rain, spinning donut, full-width visualizer |
118
+ | `?` | **Help** | Keybind reference overlay |
119
+
120
+ ### `2` — Monitor
121
+
122
+ Every graph on top, every process below. Sort it, filter it, tree it, kill it.
123
+
124
+ <img src="https://raw.githubusercontent.com/ziuus/vanta/main/docs/monitor.png" alt="vanta monitor page" width="900" />
125
+
126
+ ### `3` — Aesthetic
127
+
128
+ For when the build is running and you want something to look at.
129
+
130
+ <img src="https://raw.githubusercontent.com/ziuus/vanta/main/docs/aesthetic.png" alt="vanta aesthetic page" width="900" />
131
+
132
+ ### `?` — Help
133
+
134
+ Every key, on screen, on any page.
135
+
136
+ <img src="https://raw.githubusercontent.com/ziuus/vanta/main/docs/help.png" alt="vanta help overlay" width="900" />
137
+
138
+ ## Keys
139
+
140
+ | Key | Action |
141
+ |-----|--------|
142
+ | `1` `2` `3` | Switch page (persisted as startup page) |
143
+ | `Tab` / `Shift-Tab` | Cycle panel focus · `Esc` clears |
144
+ | `Enter` | Zoom the focused panel to the full page · `Esc` back |
145
+ | `T` | Next theme (persisted) |
146
+ | `v` | Visualizer style: bars / mirror / wave / peaks |
147
+ | `+` / `-` | Sample faster / slower |
148
+ | `Space` `n` `p` | Play/pause · next · previous (MPRIS, any page) |
149
+ | `<` `>` | Volume down / up |
150
+ | `?` | Help overlay |
151
+ | `q` | Quit |
152
+
153
+ **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)
154
+
155
+ **Calendar (focused):** `←→` month · `↑↓` year · `Home` today
156
+
157
+ ## Themes
158
+
159
+ `dark` · `catppuccin` · `tokyo-night` · `nord` · `gruvbox` · `dracula` · `light` · `solarized-light`
160
+
161
+ Cycle with `T` — your choice is written back to the config file.
162
+
163
+ ## Configuration
164
+
165
+ `~/.config/vanta/config.toml`. Every key is optional; delete the file to reset.
166
+
167
+ ```toml
168
+ [ui]
169
+ refresh_rate = 0.5 # seconds between samples
170
+ fps = 30 # render rate (animations)
171
+ theme = "dark"
172
+ startup_mode = "dashboard"
173
+ clock_24h = true
174
+ visualizer = "bars" # bars | mirror | wave | peaks
175
+
176
+ [widgets] # all default to true
177
+ cpu = true
178
+ memory = true
179
+ disk = true
180
+ network = true
181
+ gpu = true
182
+ clock = true
183
+ calendar = true
184
+ music_viz = true
185
+ processes = true
186
+ media = true
187
+ matrix = true
188
+ video = true
189
+ ```
190
+
191
+ ## Architecture
192
+
193
+ All telemetry is collected on a single background sampler thread (`/proc`, `/sys`,
194
+ sysinfo, D-Bus) into lock-guarded snapshots; the render loop only reads snapshots
195
+ and never blocks on I/O.
196
+
197
+ | Layer | Technology |
198
+ |-------|------------|
199
+ | TUI | Ratatui 0.29 + Crossterm |
200
+ | Telemetry | `sysinfo`, `/proc`, `/sys/class/{hwmon,drm,power_supply}` |
201
+ | GPU | NVIDIA (`nvidia-smi`), AMD (sysfs), Intel (clock only) |
202
+ | Media | MPRIS over D-Bus (`dbus` crate) |
203
+ | Audio viz | `cava` raw output, idle wave fallback |
204
+
205
+ ## Contributing
206
+
207
+ Issues and PRs welcome — bug reports, new themes, new panels, or a GPU vendor
208
+ that isn't covered yet.
209
+
210
+ ```bash
211
+ git clone https://github.com/ziuus/vanta && cd vanta
212
+ cargo run --release
213
+
214
+ # CI runs exactly this — make it pass first
215
+ cargo fmt --all -- --check
216
+ cargo clippy --all-targets -- -D warnings
217
+ cargo test
218
+ ```
219
+
220
+ Read **[CONTRIBUTING.md](CONTRIBUTING.md)** first — it covers how the code is laid
221
+ out, the sampler-thread rule (*never do I/O inside a `render()`*), the panel
222
+ degradation contract, and how to add a theme.
223
+
224
+ Good first contributions:
225
+
226
+ - A new theme in `src/theme.rs` (add a constructor + its name to `THEME_NAMES`)
227
+ - Per-interface network stats
228
+ - NVMe / extra `hwmon` temperature sources
229
+ - Mouse click-to-focus
230
+
231
+ ## License
232
+
233
+ [MIT](LICENSE) — do what you like, keep the notice.
234
+
235
+ <div align="center">
236
+ <br />
237
+ built by <a href="https://github.com/ziuus">zius</a> · if it's useful, a ⭐ helps
238
+ </div>
package/bin/vanta.js ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+ // Thin shim: exec the native binary that install.js downloaded next to us.
3
+ const path = require('path');
4
+ const fs = require('fs');
5
+ const { spawnSync } = require('child_process');
6
+
7
+ const bin = path.join(__dirname, 'vanta-bin');
8
+
9
+ if (!fs.existsSync(bin)) {
10
+ console.error('vanta: binary missing — reinstall with `npm install -g @ziuus/vanta`');
11
+ console.error('vanta: or build from source: cargo install --git https://github.com/ziuus/vanta');
12
+ process.exit(1);
13
+ }
14
+
15
+ const { status, signal } = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit' });
16
+ process.exit(signal ? 1 : (status ?? 1));
package/install.js ADDED
@@ -0,0 +1,73 @@
1
+ // Downloads the prebuilt vanta binary for this platform from the matching
2
+ // GitHub release. ponytail: linux-x64 only — vanta reads /proc and /sys and
3
+ // links libdbus, so there is nothing to ship for other platforms. Add targets
4
+ // here and in .github/workflows/release.yml when someone asks for them.
5
+ const fs = require('fs');
6
+ const os = require('os');
7
+ const path = require('path');
8
+ const https = require('https');
9
+ const { execFileSync } = require('child_process');
10
+
11
+ const { version } = require('./package.json');
12
+ const TARGET = 'x86_64-unknown-linux-gnu';
13
+ const ASSET = `vanta-${TARGET}.tar.gz`;
14
+ const URL = `https://github.com/ziuus/vanta/releases/download/v${version}/${ASSET}`;
15
+ const FROM_SOURCE = 'cargo install --git https://github.com/ziuus/vanta';
16
+
17
+ if (process.platform !== 'linux' || process.arch !== 'x64') {
18
+ console.error(
19
+ `vanta: no prebuilt binary for ${process.platform}-${process.arch} (linux-x64 only).`
20
+ );
21
+ console.error(`vanta: build it yourself with: ${FROM_SOURCE}`);
22
+ process.exit(1);
23
+ }
24
+
25
+ // GitHub redirects release downloads to a CDN host, so follow Location.
26
+ function download(url, hops = 0) {
27
+ return new Promise((resolve, reject) => {
28
+ if (hops > 5) return reject(new Error('too many redirects'));
29
+ https
30
+ .get(url, { headers: { 'user-agent': `@ziuus/vanta/${version}` } }, (res) => {
31
+ const { statusCode, headers } = res;
32
+ if (statusCode >= 300 && statusCode < 400 && headers.location) {
33
+ res.resume();
34
+ return download(headers.location, hops + 1).then(resolve, reject);
35
+ }
36
+ if (statusCode !== 200) {
37
+ res.resume();
38
+ return reject(new Error(`HTTP ${statusCode} for ${url}`));
39
+ }
40
+ const chunks = [];
41
+ res.on('data', (c) => chunks.push(c));
42
+ res.on('end', () => resolve(Buffer.concat(chunks)));
43
+ res.on('error', reject);
44
+ })
45
+ .on('error', reject);
46
+ });
47
+ }
48
+
49
+ (async () => {
50
+ const binDir = path.join(__dirname, 'bin');
51
+ const dest = path.join(binDir, 'vanta-bin');
52
+ const tgz = path.join(os.tmpdir(), `vanta-${version}-${process.pid}.tar.gz`);
53
+
54
+ fs.mkdirSync(binDir, { recursive: true });
55
+ process.stderr.write(`vanta: fetching ${ASSET}\n`);
56
+ fs.writeFileSync(tgz, await download(URL));
57
+
58
+ try {
59
+ execFileSync('tar', ['-xzf', tgz, '-C', binDir, 'vanta']);
60
+ fs.renameSync(path.join(binDir, 'vanta'), dest);
61
+ fs.chmodSync(dest, 0o755);
62
+ } finally {
63
+ fs.rmSync(tgz, { force: true });
64
+ }
65
+
66
+ // Fail the install rather than leave a bin shim pointing at nothing.
67
+ execFileSync(dest, ['--version'], { stdio: 'ignore' });
68
+ process.stderr.write('vanta: installed — run `vanta`\n');
69
+ })().catch((err) => {
70
+ console.error(`vanta: install failed — ${err.message}`);
71
+ console.error(`vanta: build from source instead: ${FROM_SOURCE}`);
72
+ process.exit(1);
73
+ });
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@ziuus/vanta",
3
+ "version": "0.2.0",
4
+ "description": "Aesthetic Rust TUI system dashboard — CPU, memory, disk, network, GPU, processes, now-playing, clock and visualizer in one terminal pane",
5
+ "bin": {
6
+ "vanta": "bin/vanta.js",
7
+ "vtui": "bin/vanta.js"
8
+ },
9
+ "scripts": {
10
+ "prepack": "cp ../README.md ../LICENSE . && sed -i 's|src=\"docs/|src=\"https://raw.githubusercontent.com/ziuus/vanta/main/docs/|g' README.md",
11
+ "postinstall": "node install.js"
12
+ },
13
+ "files": [
14
+ "bin/vanta.js",
15
+ "install.js"
16
+ ],
17
+ "os": [
18
+ "linux"
19
+ ],
20
+ "cpu": [
21
+ "x64"
22
+ ],
23
+ "engines": {
24
+ "node": ">=16"
25
+ },
26
+ "keywords": [
27
+ "tui",
28
+ "dashboard",
29
+ "system-monitor",
30
+ "htop",
31
+ "btop",
32
+ "ratatui",
33
+ "rust",
34
+ "terminal",
35
+ "cli"
36
+ ],
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/ziuus/vanta.git"
40
+ },
41
+ "homepage": "https://github.com/ziuus/vanta#readme",
42
+ "bugs": {
43
+ "url": "https://github.com/ziuus/vanta/issues"
44
+ },
45
+ "license": "MIT",
46
+ "author": "zius"
47
+ }