A simple, lightweight Rust daemon that monitors URLs and triggers local scripts when content changes.
- Content Monitoring: Fetches URLs and parses them using host-installed tools (like
jq,grep, orawk). - Smart Triggers: Only runs commands when the parsed output changes.
- Persistent State: Stores the last known result in JSON to survive restarts.
- Concurrent Workers: Each task runs on its own schedule using a Tokio-based event loop.
You can install upi from the AUR using your favorite helper:
yay -S upi
# or
paru -S upi# Build from source
cargo build --release
# Move to bin
mv target/release/upi /usr/local/bin/Define your tasks in a config.yml file:
# Optional: Global sync interval in seconds
global-check-every: 3600
tasks:
- url: "https://api.github.com/repos/rust-lang/rust/releases/latest"
parse: "jq -r .tag_name"
command: "notify-send 'New Rust Release: $UPI_PARSED'"
check-every: 60
- url: "https://status.example.com/api/v1/health"
parse: "jq .status"
command: "/etc/scripts/alert-on-change.sh"
check-every: 10# Run with config
upi --config config.yml
# Override global interval via CLI
upi --config config.yml --global-check-every 120When a command is triggered, the following variable is available:
$UPI_PARSED: The current output of the parse command.
MIT