summaryrefslogtreecommitdiff
path: root/AGENTS.md
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-14 00:12:54 +0200
committerPaul Buetow <paul@buetow.org>2026-02-14 00:12:54 +0200
commit5e416d613f61cfc16277d343e30c3c8a00b21b35 (patch)
treed73b06932e9806c21f4ff7a8bf3f985b361f82cf /AGENTS.md
parent956f84321860bd8e318545564474037cbd3b6fd9 (diff)
remove version and some refactoring
Diffstat (limited to 'AGENTS.md')
-rw-r--r--AGENTS.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/AGENTS.md b/AGENTS.md
index ab98ccb..34788e7 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -15,7 +15,7 @@ This file helps AI assistants (Cursor, Claude, etc.) work effectively in this re
- **github.com/veandco/go-sdl2** – SDL2 bindings for window and 2D rendering
- **Build/tasks:** Mage (`mage build`, `mage test`, `mage install`)
-Remote hosts do not need Go: the client runs `scripts/loadbars-remote.sh` locally or over SSH (stdin). No agent or extra install on remotes beyond bash and `/proc` (Linux).
+Remote hosts do not need Go: the client embeds the remote script in the binary and runs it via `bash -s` (stdin) locally or over SSH. No separate script file; install only the binary. Remotes need bash and `/proc` (Linux).
## Layout
@@ -23,14 +23,14 @@ Remote hosts do not need Go: the client runs `scripts/loadbars-remote.sh` locall
cmd/loadbars/ # Entry point: flags, config load, app.Run()
internal/
app/ # App lifecycle, store, wires collector + display
- collector/ # Runs script (local or ssh), parses M LOADAVG / M MEMSTATS / M NETSTATS / M CPUSTATS
+ collector/ # Runs embedded script (local or ssh via bash -s), parses M LOADAVG / M MEMSTATS / M NETSTATS / M CPUSTATS
config/ # Config struct, ~/.loadbarsrc load/save, cluster from /etc/clusters
constants/ # Intervals, colors (RGB), link-speed constants
display/ # SDL window, event loop, drawing (CPU/mem/net bars, hotkeys)
stats/ # HostStats, Snapshot, NetStamp; read by display
version/ # Version string (e.g. "0.8.0") – used in title bar and --version
scripts/
- loadbars-remote.sh # Emits protocol lines for collector (no Perl on remote)
+ loadbars-remote.sh # Source copy; embedded into binary at build (internal/collector/scriptdata/)
```
- **Version:** Set in `internal/version/version.go`. Shown in window title and `--version`.
@@ -42,7 +42,7 @@ scripts/
|-------------------|----------------------------|
| `mage build` | Build `loadbars` binary |
| `mage test` | Run Go tests |
-| `mage install` | Install binary + script |
+| `mage install` | Copy binary to GOPATH/bin (~/go/bin) |
| `go build -o loadbars ./cmd/loadbars` | Build without Mage |
| `./loadbars --hosts localhost` | Run locally (no SSH) |