Commit Graph
4 Commits
Author SHA1 Message Date
Joel Male e2889617fc feat: add status, uninstall commands and collector_version in pulses
- 'pulsewise-collector status' shows hostname, masked token, API endpoint,
  service running state (systemd/launchd), and last pulse timestamp
- 'pulsewise-collector uninstall' stops the service, removes the unit file,
  config dir, log file, and binary; prompts for confirmation, requires root
- State file written to /etc/pulsewise-collector/state (or ~/.config fallback)
  after each successful send to power the 'last pulse' display
- collector_version field added to every metrics payload so the server can
  surface update prompts per-host
2026-02-25 14:44:14 +10:00
Joel Male 35f8ee5347 feat: version/update subcommands, VERSION file, deploy version bumping
- Add VERSION file as canonical version source
- build.sh reads VERSION file automatically, injects via -ldflags
- deploy.sh prompts for major/minor/patch bump, injects version via
  ldflags into all 4 builds, and writes release/latest JSON file
- Add 'pulsewise-collector version' — prints version and checks for update
- Add 'pulsewise-collector update' — fetches and applies the latest release
- Default version changed to "dev" for local builds without ldflags
2026-02-25 14:40:47 +10:00
Joel Male c2241e8d87 feat: add auto-update with --no-auto-update flag
Collector now checks for updates at startup (after 30s) and every 6h.
When a newer version is detected via the /collector/release/latest endpoint,
it downloads the new binary, atomically replaces itself, then re-execs
in-place so the service manager sees no interruption.

Auto-update is enabled by default; pass --no-auto-update to disable.
Version is injected at build time via -ldflags for release builds.
2026-02-25 14:36:42 +10:00
Joel Male 4aa08d0ef4 feat: full collector with macOS support, metrics, and one-click installer
- Collect CPU, memory, swap, disk, disk I/O, network (per-second rates),
  load average, system info, uptime, and top processes via gopsutil
- Install script supports both Linux (systemd) and macOS (launchd)
- Auto-detect OS and architecture for binary download
- Accept TOKEN env var for non-interactive installs
- Config at /etc/pulsewise-collector/config with simple KEY=VALUE format
- Debug mode logs full response body
- Hostname auto-detected if not set in config
2026-02-15 16:04:57 +10:00