watcher π
Compare runtime environments across servers β fast, read-only, and CI-friendly.
Watcher is a lightweight CLI that detects and compares runtimes (Java, Python, Node.js, Go, Docker, etc.) across local and remote servers over gRPC. It gives operators and SREs reliable answers to:
βWhy does this server behave differently from that one?β
βAre all environments actually running the same versions?β
β If this tool helps you inspect or debug infrastructure, consider giving it a star β it really helps.
Why Watcher?
- Read-only, safe to run on production boxes
- Fast comparisons across many hosts
- Extensible detector registry for new runtimes
- Friendly to CI pipelines and automation
- API-key authentication for remote access
Watcher observes; it never mutates target machines. Run it on prod nodes, CI runners, or anywhere you need version truth.
What it does
- Detects installed runtimes and versions:
- Java, Python, Node.js, Go, Docker
- MySQL/MariaDB, Redis, Nginx
- Collects data locally or remotely via gRPC
- Compares versions across multiple servers
- Outputs results as tables, JSON, or YAML
Example
Multi-server comparison
βββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββ
β RUNTIME β SERVER-1 β SERVER-2 β STATUS β
βββββββββββΌββββββββββββΌββββββββββββΌββββββββββ€
β python β 3.10.12 β 3.10.12 β SAME β
β go β 1.25.5 β 1.25.5 β SAME β
β node β x β 20.18.0 β PARTIAL β
β docker β x β 27.5.1 β PARTIAL β
β java β x β 17.0.17 β PARTIAL β
βββββββββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββ
Environment drift becomes instantly visible.
Installation
Quick install
go install github.com/binaryarc/watcher/cmd/wctl@latest
go install github.com/binaryarc/watcher/cmd/wsctl@latest
Ensure $GOPATH/bin is on your PATH.
Build from source
git clone https://github.com/binaryarc/watcher.git
cd watcher
make build
This produces:
wctl β client CLI
wsctl β server CLI
Usage
Local runtime check
wctl get runtimes
wctl get runtime java
Example output for wctl get runtimes:
Observing local runtimes...
βββββββββββ¬ββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββ
β RUNTIME β VERSION β PATH β
βββββββββββΌββββββββββΌβββββββββββββββββββββββββββββββββββββββββββ€
β java β 17.0.17 β /opt/java/bin/java β
β python β 3.10.12 β /usr/bin/python3 β
β node β 20.18.0 β /opt/node/bin/node β
β go β 1.25.5 β /usr/local/go/bin/go β
β docker β 27.5.1 β /usr/bin/docker β
βββββββββββ΄ββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββ
Total: 5 runtime(s) detected
Remote runtime check
On each target server:
wsctl run --port 9090
From your client:
wctl get runtimes --host 192.168.1.100:9090
wctl get runtime java --host server.example.com:9090 -o json
Compare multiple servers
wctl compare runtimes --hosts server1:9090,server2:9090,server3:9090
Authentication & API keys
Watcher uses shared API keys for every remote RPC.
Client side
Generate and store a key:
wctl key gen
Print the currently saved key:
wctl get key
Keys load automatically in this order:
--api-key flag
WATCHER_API_KEY environment variable
- File at
~/.watcher/keys/default
Server side
Register keys and start the server:
wsctl add key <api-key> "CI pipeline token"
wsctl run --port 9090
Manage keys:
wsctl get keys
wsctl delete key --name <api-key>
wsctl clear keys
For quick tests you can disable auth:
wsctl run --disable-auth
(Not recommended for production.)
How it works
wctl (client) --- gRPC ---> wsctl (server)
|
runtime detectors
Supported runtimes
- Java
- Python
- Node.js
- Go
- Docker
- MySQL / MariaDB
- Redis
- Nginx
Detection relies on standard version commands (java -version, python3 --version, ...).
Project structure
cmd/
wctl/ CLI client
wsctl/ gRPC server CLI
internal/
detector/ runtime detection logic
grpcclient/ client wrapper
grpcserver/ server implementation
proto/ gRPC definitions
Roadmap
- Binary releases (Linux/macOS) β first tag:
v0.1.0
- One-line install script
- Shell auto-completion (bash/zsh/fish)
- Baseline comparison (
--baseline)
- CI mode with exit codes (
--ci)
- Snapshot & diff support
Ideas, bug reports, and feature requests are welcome.
Contributing
Watcher is evolving. Issues and pull requests are encouraged.
If this fits your workflow, a β on the repository makes a big difference.
License
Watcher is distributed under the MIT License. See LICENSE for details.