@serve.zone/nupst

a command-line tool that monitors SNMP-enabled UPS devices and initiates system shutdown when power outages are detected and battery levels are low.

readme.md for @serve.zone/nupst

⚡ NUPST — Network UPS Shutdown Tool

Keep your systems safe when the power goes out. NUPST is a lightweight, battle-tested CLI tool that monitors UPS devices via SNMP or NUT (UPSD) and orchestrates graceful shutdowns during power emergencies — including Proxmox VMs, LXC containers, and the host itself.

Distributed as self-contained binaries with zero runtime dependencies. No Node.js, no Python, no package managers. Just download and run.

Issue Reporting and Security

For reporting bugs, issues, or security vulnerabilities, please visit community.foss.global/. This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a code.foss.global/ account to submit Pull Requests directly.

✨ Features

🚀 Quick Start

One-Line Installation

curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh | sudo bash

Initial Setup

# 1. Add your first UPS device (interactive wizard)
sudo nupst ups add

# 2. Test the connection
nupst ups test

# 3. Enable and start monitoring
sudo nupst service enable
sudo nupst service start

# 4. Check status
nupst service status

That's it! Your system is now protected. 🛡️

📥 Installation

Automated Installer (Recommended)

curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh | sudo bash

What it does:

  1. Detects your platform (OS + architecture)
  2. Downloads the latest pre-compiled binary
  3. Installs to /opt/nupst/nupst
  4. Creates symlink at /usr/local/bin/nupst
  5. Preserves existing configuration

Options:

# Install specific version
curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh | \
  sudo bash -s -- --version v5.0.0

# Custom installation directory
curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh | \
  sudo bash -s -- --install-dir /usr/local/nupst

# Show help
curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh | bash -s -- --help

Manual Installation

Download the binary for your platform from releases:

Platform Binary
Linux x64 nupst-linux-x64
Linux ARM64 nupst-linux-arm64
macOS Intel nupst-macos-x64
macOS Apple Silicon nupst-macos-arm64
Windows x64 nupst-windows-x64.exe
# Download (replace with your platform)
curl -sSL https://code.foss.global/serve.zone/nupst/releases/download/v5.0.0/nupst-linux-x64 -o nupst
chmod +x nupst
sudo mv nupst /usr/local/bin/nupst

Via npm

npm install -g @serve.zone/nupst

This downloads the appropriate pre-compiled binary for your platform during installation.

Verify Installation

nupst --version
nupst help

📖 CLI Reference

Command Structure

nupst <command> [subcommand] [options]

Global Options

Flag Description
--version, -v Show version
--help, -h Show help
--debug, -d Enable debug mode (verbose SNMP/UPSD logging)

Service Management

nupst service enable          # Install and enable systemd service
nupst service disable         # Stop and disable systemd service
nupst service start           # Start the service
nupst service stop            # Stop the service
nupst service restart         # Restart the service
nupst service status          # Show service and UPS status
nupst service logs            # Tail live service logs (Ctrl+C to exit)

UPS Device Management

nupst ups add                 # Add a new UPS device (interactive wizard)
nupst ups edit [id]           # Edit a UPS device
nupst ups remove <id>         # Remove a UPS device
nupst ups list                # List all UPS devices
nupst ups test                # Test all UPS connections

During nupst ups add, you'll choose a communication protocol:

Group Management

nupst group add               # Create a new UPS group
nupst group edit <id>         # Edit a group
nupst group remove <id>       # Remove a group
nupst group list              # List all groups

Action Management

nupst action add <target-id>          # Add action to a UPS or group
nupst action remove <target-id> <idx> # Remove an action by index
nupst action list [target-id]         # List actions (optionally for a target)

Pause/Resume

Temporarily suppress actions during maintenance (UPS polling continues):

nupst pause                   # Pause indefinitely
nupst pause --duration 30m    # Pause for 30 minutes (auto-resume)
nupst pause --duration 2h     # Pause for 2 hours
nupst pause --duration 1d     # Pause for 1 day (max: 24h)
nupst resume                  # Resume immediately

When paused:

Feature Management

nupst feature httpServer      # Configure HTTP JSON status API

Other Commands

nupst config show             # Display current configuration
nupst upgrade                 # Upgrade to latest version (requires root)
nupst uninstall               # Completely remove NUPST (requires root)

⚙️ Configuration

NUPST stores configuration at /etc/nupst/config.json. The easiest way to configure is through the interactive CLI commands, but you can also edit the JSON directly.

Example Configuration

{
  "version": "4.3",
  "checkInterval": 30000,
  "httpServer": {
    "enabled": true,
    "port": 8080,
    "path": "/ups-status",
    "authToken": "your-secret-token"
  },
  "upsDevices": [
    {
      "id": "ups-main",
      "name": "Main Server UPS",
      "protocol": "snmp",
      "snmp": {
        "host": "192.168.1.100",
        "port": 161,
        "community": "public",
        "version": 1,
        "timeout": 5000,
        "upsModel": "cyberpower",
        "runtimeUnit": "ticks"
      },
      "actions": [
        {
          "type": "proxmox",
          "triggerMode": "onlyThresholds",
          "thresholds": { "battery": 30, "runtime": 15 },
          "proxmoxHost": "localhost",
          "proxmoxPort": 8006,
          "proxmoxTokenId": "root@pam!nupst",
          "proxmoxTokenSecret": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
        },
        {
          "type": "shutdown",
          "triggerMode": "onlyThresholds",
          "thresholds": { "battery": 20, "runtime": 10 },
          "shutdownDelay": 10
        }
      ],
      "groups": ["datacenter"]
    },
    {
      "id": "ups-usb",
      "name": "Local USB UPS",
      "protocol": "upsd",
      "upsd": {
        "host": "127.0.0.1",
        "port": 3493,
        "upsName": "ups",
        "timeout": 5000
      },
      "actions": [
        {
          "type": "shutdown",
          "triggerMode": "onlyThresholds",
          "thresholds": { "battery": 15, "runtime": 5 },
          "shutdownDelay": 5
        }
      ],
      "groups": []
    }
  ],
  "groups": [
    {
      "id": "datacenter",
      "name": "Data Center",
      "mode": "redundant",
      "description": "Redundant UPS setup",
      "actions": [
        {
          "type": "shutdown",
          "triggerMode": "onlyThresholds",
          "thresholds": { "battery": 10, "runtime": 5 },
          "shutdownDelay": 15
        }
      ]
    }
  ]
}

UPS Device Configuration

Protocol Selection

Each UPS device has a protocol field:

Protocol Use Case Default Port
snmp Network-attached UPS with SNMP agent 161
upsd USB-connected UPS via local NUT server 3493

SNMP Settings (snmp object)

Field Description Values / Default
host IP address or hostname e.g., "192.168.1.100"
port SNMP port Default: 161
version SNMP version 1, 2, or 3
timeout Timeout in milliseconds Default: 5000
upsModel UPS brand/model cyberpower, apc, eaton, tripplite, liebert, custom
runtimeUnit Battery runtime unit minutes, seconds, or ticks (1/100s). Overrides auto-detection
community Community string (v1/v2c) Default: "public"

SNMPv3 fields (when version: 3):

Field Description Values
securityLevel Security level noAuthNoPriv, authNoPriv, authPriv
username Authentication username
authProtocol Auth protocol MD5 or SHA
authKey Auth password
privProtocol Encryption protocol DES or AES
privKey Encryption password

UPSD/NIS Settings (upsd object)

For USB-connected UPS via NUT (Network UPS Tools):

Field Description Default
host NUT server address 127.0.0.1
port NUT UPSD port 3493
upsName NUT device name ups
timeout Connection timeout (ms) 5000
username Optional auth username
password Optional auth password

NUT variables mapped: ups.status, battery.charge, battery.runtime, ups.load, ups.realpower, output.voltage, output.current

Action Configuration

Actions define automated responses to UPS conditions. They run sequentially in array order, so place Proxmox actions before shutdown actions.

Action Types

Type Description
shutdown Graceful system shutdown with configurable delay
webhook HTTP POST/GET notification to external services
script Execute custom shell scripts from /etc/nupst/
proxmox Shut down Proxmox QEMU VMs and LXC containers via REST API

Common Fields

Field Description Values / Default
type Action type shutdown, webhook, script, proxmox
thresholds Battery and runtime limits { "battery": 0-100, "runtime": minutes }
triggerMode When to trigger See Trigger Modes below

Trigger Modes

Mode Description
onlyPowerChanges Only when power status changes (online ↔ onBattery)
onlyThresholds Only when battery or runtime thresholds are violated
powerChangesAndThresholds On power changes OR threshold violations (default)
anyChange On every polling cycle

Shutdown Action

{
  "type": "shutdown",
  "thresholds": { "battery": 20, "runtime": 10 },
  "triggerMode": "onlyThresholds",
  "shutdownDelay": 10
}
Field Description Default
shutdownDelay Seconds to wait before shutdown 5

Webhook Action

{
  "type": "webhook",
  "thresholds": { "battery": 30, "runtime": 15 },
  "triggerMode": "powerChangesAndThresholds",
  "webhookUrl": "https://hooks.slack.com/services/...",
  "webhookMethod": "POST",
  "webhookTimeout": 10000
}
Field Description Default
webhookUrl URL to call Required
webhookMethod HTTP method POST
webhookTimeout Timeout in ms 10000

Script Action

{
  "type": "script",
  "thresholds": { "battery": 25, "runtime": 10 },
  "triggerMode": "onlyThresholds",
  "scriptPath": "pre-shutdown.sh",
  "scriptTimeout": 60000
}
Field Description Default
scriptPath Script filename in /etc/nupst/ Required
scriptTimeout Execution timeout in ms 60000

🖥️ Proxmox Action

Gracefully shuts down QEMU VMs and LXC containers on a Proxmox node before the host is shut down.

{
  "type": "proxmox",
  "thresholds": { "battery": 30, "runtime": 15 },
  "triggerMode": "onlyThresholds",
  "proxmoxHost": "localhost",
  "proxmoxPort": 8006,
  "proxmoxTokenId": "root@pam!nupst",
  "proxmoxTokenSecret": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "proxmoxExcludeIds": [100, 101],
  "proxmoxStopTimeout": 120,
  "proxmoxForceStop": true,
  "proxmoxInsecure": true
}
Field Description Default
proxmoxHost Proxmox API host localhost
proxmoxPort Proxmox API port 8006
proxmoxNode Proxmox node name Auto-detect via hostname
proxmoxTokenId API token ID (e.g. root@pam!nupst) Required
proxmoxTokenSecret API token secret (UUID) Required
proxmoxExcludeIds VM/CT IDs to skip []
proxmoxStopTimeout Seconds to wait for graceful shutdown 120
proxmoxForceStop Force-stop VMs/CTs that don't shut down true
proxmoxInsecure Skip TLS verification (self-signed certs) true

Setting up the API token on Proxmox:

# Create token with full privileges (no privilege separation)
pveum user token add root@pam nupst --privsep=0

⚠️ Important: Place the Proxmox action before the shutdown action in the actions array so VMs are stopped before the host shuts down.

Group Configuration

Groups coordinate actions across multiple UPS devices:

Field Description Values
id Unique group identifier
name Human-readable name
mode Group operating mode redundant, nonRedundant
description Optional description
actions Array of action configurations

Group Modes:

HTTP Server Configuration

# Interactive setup
sudo nupst feature httpServer
{
  "httpServer": {
    "enabled": true,
    "port": 8080,
    "path": "/ups-status",
    "authToken": "your-secret-token"
  }
}

Query the API:

# Bearer token
curl -H "Authorization: Bearer your-secret-token" http://localhost:8080/ups-status

# Query parameter
curl "http://localhost:8080/ups-status?token=your-secret-token"

Response format:

{
  "upsDevices": [
    {
      "id": "ups-main",
      "name": "Main Server UPS",
      "powerStatus": "online",
      "batteryCapacity": 100,
      "batteryRuntime": 45,
      "outputLoad": 23,
      "outputPower": 115,
      "outputVoltage": 230.5,
      "outputCurrent": 0.5,
      "consecutiveFailures": 0,
      "unreachableSince": 0,
      "lastStatusChange": 1729685123456,
      "lastCheckTime": 1729685153456
    }
  ],
  "paused": false
}

When monitoring is paused:

{
  "upsDevices": [...],
  "paused": true,
  "pauseState": {
    "pausedAt": 1729685123456,
    "pausedBy": "cli",
    "resumeAt": 1729686923456
  }
}

🛡️ Network Loss Detection

NUPST tracks communication failures per UPS device:

Power status values: online | onBattery | unknown | unreachable

🖥️ Monitoring

Status Display

$ nupst service status

UPS Devices (2):
  ✓ Main Server UPS (online - 100%, 3840min)
    Host: 192.168.1.100:161 (SNMP)
    Groups: Data Center
    Action: proxmox (onlyThresholds: battery<30%, runtime<15min)
    Action: shutdown (onlyThresholds: battery<20%, runtime<10min, delay=10s)

  ✓ Local USB UPS (online - 95%, 2400min)
    Host: 127.0.0.1:3493 (UPSD)
    Action: shutdown (onlyThresholds: battery<15%, runtime<5min, delay=5s)

Groups (1):
  ℹ Data Center (redundant)
    UPS Devices (1): Main Server UPS
    Action: shutdown (onlyThresholds: battery<10%, runtime<5min, delay=15s)

Live Logs

nupst service logs
[2026-02-20 10:30:15] ℹ NUPST daemon started
[2026-02-20 10:30:15] ✓ Connected to Main Server UPS (192.168.1.100)
[2026-02-20 10:30:45] ℹ Status check: All systems normal
[2026-02-20 10:31:15] ⚠ Main Server UPS on battery (85%, 45min remaining)
[2026-02-20 10:35:00] ⚠ UPS Unreachable: Backup UPS (3 consecutive failures)
[2026-02-20 10:37:30] ✓ UPS Recovered: Backup UPS (downtime: 2m 30s)

🔒 Security

Architecture

SNMP Security

Full SNMPv3 support with authentication and encryption:

Security Level Description
noAuthNoPriv No authentication, no encryption
authNoPriv MD5/SHA authentication without encryption
authPriv Authentication + DES/AES encryption ✅

Network Security

Verifying Downloads

curl -sSL https://code.foss.global/serve.zone/nupst/releases/download/v5.0.0/nupst-linux-x64 -o nupst
curl -sSL https://code.foss.global/serve.zone/nupst/releases/download/v5.0.0/SHA256SUMS.txt -o SHA256SUMS.txt
sha256sum -c SHA256SUMS.txt --ignore-missing

🔒 Supported UPS Models

SNMP-based

Brand Config Value Notes
CyberPower cyberpower Full support including power metrics
APC apc Smart-UPS, Back-UPS series
Eaton eaton Eaton/Powerware UPS
TrippLite tripplite SmartPro and similar
Liebert/Vertiv liebert GXT, PSI series
Custom custom Provide your own OID mappings

Custom OIDs example:

{
  "upsModel": "custom",
  "runtimeUnit": "seconds",
  "customOIDs": {
    "POWER_STATUS": "1.3.6.1.4.1.1234.1.1.0",
    "BATTERY_CAPACITY": "1.3.6.1.4.1.1234.1.2.0",
    "BATTERY_RUNTIME": "1.3.6.1.4.1.1234.1.3.0"
  }
}

💡 Tip: If your UPS (e.g., HPE, Huawei) reports runtime in seconds instead of minutes, set "runtimeUnit": "seconds". For CyberPower-style TimeTicks (1/100 second), use "ticks". When omitted, NUPST auto-detects based on upsModel.

UPSD/NIS-based

Any UPS supported by NUT (Network UPS Tools) — this covers hundreds of models from virtually every manufacturer, including USB-connected devices. Check the NUT hardware compatibility list.

🔄 Updating

Built-in Update

sudo nupst upgrade

Re-run Installer

curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh | sudo bash

The installer preserves your configuration and restarts the service if it was running.

🗑️ Uninstallation

# Interactive uninstall
sudo nupst uninstall

# Or manual removal
sudo nupst service disable
sudo rm /usr/local/bin/nupst
sudo rm -rf /opt/nupst
sudo rm -rf /etc/nupst
sudo rm /etc/systemd/system/nupst.service
sudo systemctl daemon-reload

🔧 Troubleshooting

Binary Won't Execute

chmod +x /opt/nupst/nupst
uname -m  # x86_64 = x64, aarch64 = arm64

Service Won't Start

sudo systemctl status nupst
sudo journalctl -u nupst -n 50
nupst config show
nupst ups test --debug

Can't Connect to UPS

# SNMP
nupst ups test --debug
ping <ups-ip>
nc -zv <ups-ip> 161

# UPSD/NUT
nc -zv 127.0.0.1 3493
upsc ups@localhost  # if NUT CLI is installed

Proxmox VMs Not Shutting Down

# Verify API token works
curl -k -H "Authorization: PVEAPIToken=root@pam!nupst=YOUR-SECRET" \
  https://localhost:8006/api2/json/nodes/$(hostname)/qemu

# Check token permissions
pveum user token list root@pam

Actions Not Triggering

nupst action list
nupst service logs
# Check if monitoring is paused
nupst service status

📊 System Changes

File System

Path Description
/opt/nupst/nupst Pre-compiled binary
/usr/local/bin/nupst Symlink to binary
/etc/nupst/config.json Configuration file
/etc/nupst/pause Pause state file (when paused)
/etc/systemd/system/nupst.service Systemd service unit

Services

Network

🚀 Migration from v3.x

curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh | sudo bash

The installer auto-detects v3.x installations, migrates the configuration, and swaps the binary. Your settings are preserved.

Aspect v3.x v4.x+
Runtime Node.js + npm Deno (self-contained)
Distribution Git repo + npm install Pre-compiled binaries
Runtime Dependencies node_modules Zero
Size ~150MB ~80MB
Commands Flat (nupst add) Subcommands (nupst ups add)

💻 Development

Requirements: Deno v1.x or later

git clone https://code.foss.global/serve.zone/nupst.git
cd nupst

# Run directly
deno run --allow-all mod.ts help

# Type check
deno task check

# Lint
deno task lint

# Run tests
deno test --allow-all test/

# Compile for current platform
deno compile --allow-all --output nupst mod.ts

# Compile for all platforms
deno task compile

Project Structure

nupst/
├── mod.ts                    # Entry point
├── deno.json                 # Deno configuration
├── ts/
│   ├── cli.ts                # CLI command routing
│   ├── nupst.ts              # Main coordinator class
│   ├── daemon.ts             # Background monitoring daemon
│   ├── systemd.ts            # Systemd service management
│   ├── http-server.ts        # Optional HTTP JSON API
│   ├── constants.ts          # Centralized constants
│   ├── snmp/                 # SNMP protocol implementation
│   ├── upsd/                 # UPSD/NIS protocol implementation (NUT)
│   ├── protocol/             # Protocol abstraction layer
│   ├── actions/              # Action system (shutdown, webhook, script, proxmox)
│   ├── migrations/           # Config version migrations
│   ├── helpers/              # Utility functions
│   ├── interfaces/           # Shared TypeScript interfaces
│   └── cli/                  # CLI command handlers
├── scripts/                  # Build and install scripts
└── test/                     # Test files

This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the license file.

Please note: The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.

Trademarks

This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.

Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.

Company Information

Task Venture Capital GmbH Registered at District Court Bremen HRB 35230 HB, Germany

By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.

changelog.md for @serve.zone/nupst

2026-03-30 - 5.4.1 - fix(deps)

bump tsdeno and net-snmp patch dependencies

2026-03-30 - 5.4.0 - feat(snmp)

add configurable SNMP runtime units with v4.3 migration support

2026-03-18 - 5.3.3 - fix(deps)

add @git.zone/tsdeno as a development dependency

2026-03-18 - 5.3.2 - fix(build)

replace manual release compilation workflows with tsdeno-based build configuration

2026-03-15 - 5.3.1 - fix(cli)

rename the update command references to upgrade across the CLI and documentation

2026-02-20 - 5.3.0 - feat(daemon)

Add UPSD (NUT) protocol support, Proxmox VM shutdown action, pause/resume monitoring, and network-loss/unreachable handling; bump config version to 4.2

2026-01-29 - 5.2.4 - fix()

no changes

2026-01-29 - 5.2.3 - fix(core)

fix lint/type issues and small refactors

2026-01-29 - 5.2.2 - fix(core)

tidy formatting and minor fixes across CLI, SNMP, HTTP server, migrations and packaging

2026-01-29 - 5.2.1 - fix(cli(ups-handler), systemd)

add type guards and null checks for UPS configs; improve SNMP handling and prompts; guard version display

2026-01-29 - 5.2.0 - feat(core)

Centralize timeouts/constants, add CLI prompt helpers, and introduce webhook/script actions with safety and SNMP refactors

2025-11-09 - 5.1.11 - fix(readme)

Update README installation instructions to recommend automated installer script and clarify npm installation

2025-10-23 - 5.1.10 - fix(config)

Synchronize deno.json version with package.json, tidy formatting, and add local tooling settings

2025-10-23 - 5.1.9 - fix(dev)

Add local assistant permissions/settings file (.claude/settings.local.json)

2025-10-23 - 5.1.2 - fix(scripts)

Add build script to package.json and include local dev tool settings

2025-10-23 - 5.1.1 - fix(tooling)

Add .claude/settings.local.json with local automation permissions

2025-10-22 - 5.1.0 - feat(packaging)

Add npm packaging and installer: wrapper, postinstall downloader, publish workflow, and packaging files

2025-10-18 - 4.0.0 - BREAKING CHANGE(core): Complete migration to Deno runtime

MAJOR RELEASE: NUPST v4.0 is a complete rewrite powered by Deno

This release fundamentally changes NUPST's architecture from Node.js-based to Deno-based, distributed as pre-compiled binaries. This is a breaking change in terms of installation and distribution, but configuration files from v3.x are fully compatible.

Breaking Changes

Installation & Distribution:

CLI Structure (Backward Compatible):

New Features

Distribution & Installation:

CI/CD Automation:

CLI Improvements:

Technical Improvements:

Migration Guide

For Users:

  1. Stop existing v3.x service: sudo nupst disable
  2. Install v4.0 using new installer: curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh | sudo bash -s -- -y
  3. Your configuration at /etc/nupst/config.json is preserved and fully compatible
  4. Enable service with new CLI: sudo nupst service enable && sudo nupst service start
  5. Update systemd commands to use new syntax (old syntax still works with warnings)

Configuration Compatibility:

Command Mapping:

# Old (v3.x)              → New (v4.0)
nupst enable              → nupst service enable
nupst disable             → nupst service disable
nupst start               → nupst service start
nupst stop                → nupst service stop
nupst status              → nupst service status
nupst logs                → nupst service logs
nupst add                 → nupst ups add
nupst edit [id]           → nupst ups edit [id]
nupst delete <id>         → nupst ups remove <id>
nupst list                → nupst ups list
nupst test                → nupst ups test
nupst group add           → nupst group add (unchanged)
nupst group edit <id>     → nupst group edit <id> (unchanged)
nupst group delete <id>   → nupst group remove <id>
nupst group list          → nupst group list (unchanged)
nupst config              → nupst config show

Technical Details

Commit History:

Files Changed:

Dependencies:

Benefits

For Users:

For Developers:

Known Issues

Acknowledgments

This release represents a complete modernization of NUPST's infrastructure while maintaining full backward compatibility for user configurations. Special thanks to the Deno team for creating an excellent runtime that made this migration possible.


2025-03-28 - 3.1.2 - fix(cli/ups-handler)

Improve UPS device listing table formatting for better column alignment

2025-03-28 - 3.1.1 - fix(cli)

Improve table header formatting in group and UPS listings

2025-03-28 - 3.1.0 - feat(cli)

Refactor CLI commands to use dedicated handlers for UPS, group, and service management

2025-03-28 - 3.0.1 - fix(cli)

Simplify UPS ID generation by removing the redundant promptForUniqueUpsId function in the CLI module and replacing it with the shortId helper.

2025-03-28 - 3.0.0 - BREAKING CHANGE(core)

Add multi-UPS support and group management; update CLI, configuration and documentation to support multiple UPS devices with group modes

2025-03-26 - 2.6.17 - fix(logger)

Preserve logbox width after logBoxEnd so that subsequent logBoxLine calls continue using the set width.

2025-03-26 - 2.6.16 - fix(cli)

Improve CLI logging consistency by replacing direct console output with unified logger calls.

2025-03-26 - 2.6.15 - fix(logger)

Replace direct console logging with unified logger interface for consistent formatting

2025-03-26 - 2.6.14 - fix(systemd)

Shorten closing log divider in systemd service installation output for consistent formatting.

2025-03-26 - 2.6.13 - fix(cli)

Fix CLI update output box formatting

2025-03-26 - 2.6.12 - fix(systemd)

Adjust logging border in systemd service installation output

2025-03-26 - 2.6.11 - fix(cli, systemd)

Adjust log formatting for consistent output in CLI and systemd commands

2025-03-26 - 2.6.10 - fix(daemon)

Adjust console log box formatting for consistent output in daemon status messages

2025-03-26 - 2.6.9 - fix(cli)

Improve console output formatting for status banners and logging messages

2025-03-26 - 2.6.8 - fix(cli)

Improve CLI formatting, refine debug option filtering, and remove unused dgram import in SNMP manager

2025-03-26 - 2.6.7 - fix(setup.sh)

Clarify net-snmp dependency installation message in setup.sh

2025-03-26 - 2.6.6 - fix(setup.sh)

Improve setup script to detect and execute npm-cli.js directly using the Node.js binary

2025-03-26 - 2.6.5 - fix(daemon, setup)

Improve shutdown command detection and fallback logic; update setup script to use absolute Node/npm paths

2025-03-26 - 2.6.4 - fix(setup)

Improve installation process in setup script by cleaning up package files and ensuring a minimal net-snmp dependency installation.

2025-03-26 - 2.6.3 - fix(setup)

Update setup script to install only net-snmp dependency and create a minimal package-lock.json for better dependency control.

2025-03-26 - 2.6.2 - fix(setup/readme)

Improve force update instructions and dependency installation process in setup.sh and readme.md

2025-03-26 - 2.6.1 - fix(setup)

Update setup.sh to temporarily add vendor Node.js binary to PATH for dependency installation, log Node and npm versions, and restore the original PATH afterwards.

2025-03-26 - 2.6.0 - feat(setup)

Add --force update flag to setup script and update installation instructions

2025-03-26 - 2.5.2 - fix(installer)

Improve Node.js binary detection, dependency management, and SNMPv3 fallback logic

2025-03-25 - 2.5.1 - fix(snmp)

Fix Eaton UPS support by updating power status OID and adjusting battery runtime conversion.

2025-03-25 - 2.5.0 - feat(cli)

Automatically restart running NUPST service after configuration changes in interactive setup

2025-03-25 - 2.4.8 - fix(installer)

Improve Git dependency handling and repository cloning in install.sh

2025-03-25 - 2.4.7 - fix(readme)

Update installation instructions to combine download and execution into a single command for clarity

2025-03-25 - 2.4.6 - fix(installer)

Improve installation instructions for interactive and non-interactive setups

2025-03-25 - 2.4.5 - fix(install)

Improve interactive terminal detection and update installation instructions

2025-03-25 - 2.4.4 - fix(install)

Improve interactive mode detection and non-interactive installation handling in install.sh

2025-03-25 - 2.4.3 - fix(readme)

Update Quick Install command syntax in readme for auto-yes installation

2025-03-25 - 2.4.2 - fix(daemon)

Refactor shutdown initiation logic in daemon by moving the initiateShutdown and monitorDuringShutdown methods from the SNMP manager to the daemon, and update calls accordingly

2025-03-25 - 2.4.1 - fix(docs)

Update readme with detailed legal and trademark guidance

2025-03-25 - 2.4.0 - feat(installer)

Add auto-yes flag to installer and update installation documentation

2025-03-25 - 2.3.0 - feat(installer/cli)

Add OS detection and git auto-installation support to install.sh and improve service setup prompt in CLI

2025-03-25 - 2.2.0 - feat(cli)

Add 'config' command to display current configuration and update CLI help

2025-03-25 - 2.1.0 - feat(cli)

Add uninstall command to CLI and update shutdown delay for graceful VM shutdown

2025-03-25 - 2.0.1 - fix(cli/systemd)

Fix status command to pass debug flag and improve systemd status logging output

2025-03-25 - 2.0.0 - BREAKING CHANGE(snmp)

refactor: update SNMP type definitions and interface names for consistency

2025-03-25 - 1.10.1 - fix(systemd/readme)

Improve README documentation and fix UPS status retrieval in systemd service

2025-03-25 - 1.10.0 - feat(core)

Add update checking and version logging across startup components

2025-03-25 - 1.9.0 - feat(cli)

Add update command to CLI to update NUPST from repository and refresh the systemd service

2025-03-25 - 1.8.2 - fix(cli)

Refactor logs command to use child_process spawn for real-time log tailing

2025-03-25 - 1.8.1 - fix(systemd)

Update ExecStart in systemd service template to use /opt/nupst/bin/nupst for daemon startup

2025-03-25 - 1.8.0 - feat(core)

Enhance SNMP module and interactive CLI setup for UPS shutdown

2025-03-25 - 1.7.6 - fix(core)

Refactor SNMP, systemd, and CLI modules to improve error handling, logging, and code clarity

2025-03-25 - 1.7.5 - fix(cli)

Enable SNMP debug mode in CLI commands and update debug flag handling in daemon-start and test; bump version to 1.7.4

2025-03-25 - 1.7.3 - fix(SNMP)

Refine SNMP packet creation and response parsing for more reliable UPS status monitoring

2025-03-25 - 1.7.2 - fix(core)

Refactor internal SNMP response parsing and enhance daemon logging for improved error reporting and clarity.

2025-03-25 - 1.7.1 - fix(snmp-cli)

Improve SNMP response parsing and CLI UPS connection timeout handling

2025-03-25 - 1.7.0 - feat(SNMP/UPS)

Add UPS model selection and custom OIDs support to handle different UPS brands

2025-03-25 - 1.6.0 - feat(cli,snmp)

Enhance debug logging and add debug mode support in CLI and SNMP modules

2025-03-25 - 1.5.0 - feat(cli)

Enhance CLI output: display SNMPv3 auth/priv details and support timeout customization during setup

2025-03-25 - 1.4.1 - fix(version)

Bump patch version for consistency with commit info

2025-03-25 - 1.4.0 - feat(snmp)

Implement native SNMPv3 support with simulated encryption and enhanced authentication handling.

2025-03-25 - 1.3.1 - fix(cli)

Remove redundant SNMP tools checks in CLI and Systemd modules

2025-03-25 - 1.3.0 - feat(cli)

add test command to verify UPS SNMP configuration and connectivity

2025-03-25 - 1.2.6 - fix(cli)

Refactor interactive setup to use dynamic import for readline and ensure proper cleanup

2025-03-25 - 1.2.5 - fix(error-handling)

Improve error handling in CLI, daemon, and systemd lifecycle management with enhanced logging for configuration issues

2025-03-25 - 1.2.4 - fix(cli/daemon)

Improve logging and user feedback in interactive setup and UPS monitoring

2025-03-24 - 1.2.3 - fix(nupst)

No changes

2025-03-24 - 1.2.2 - fix(bin/nupst)

2025-03-24 - 1.2.1 - fix(bin)

Simplify Node.js binary detection in installation script

2025-03-24 - 1.2.0 - feat(installer)

Improve Node.js binary detection and dynamic LTS version retrieval in setup scripts

2025-03-24 - 1.1.2 - fix(setup.sh)

Improve error handling in setup.sh: exit immediately when the downloaded npm package lacks the dist_ts directory, removing the fallback build-from-source mechanism.

2025-03-24 - 1.1.1 - fix(package.json)

Remove unused prepublishOnly script and update files field in package.json

2025-03-24 - 1.1.0 - feat(installer-setup)

Enhance installer and setup scripts for improved global installation and artifact management

2025-03-24 - 1.0.1 - fix(version)

Bump version to 1.0.1

2025-03-24 - 1.0.1 - fix(build)

Update build script to use 'tsbuild tsfolders --allowimplicitany' and adjust distribution paths in .gitignore

2025-03-24 - 1.0.1 - fix(build)

Update build script to use 'tsbuild tsfolders --allowimplicitany' and regenerate distribution type definitions for CLI, daemon, index, nupst, snmp, and systemd modules

2025-03-24 - 1.0.1 - fix(build)

Update build script to use 'tsbuild tsfolders --allowimplicitany' and regenerate distribution type definitions for CLI, daemon, nupst, snmp, and systemd modules.

2025-03-23 - 1.0.0 - initial setup

This range covers the early commits that mainly established the repository structure.