watchfor (Ruby)
Official Ruby SDK + CLI for WatchFor — uptime & infrastructure monitoring over the REST API. Zero dependencies (Ruby stdlib only).
Also available: a TypeScript SDK, a Python SDK, an MCP server and an A2A agent.
Install
gem install watchfor
Quick start
require "watchfor"
wf = Watchfor::Client.new(api_key: "wf_live_...") # Settings → API keys
pp wf.summary
wf.monitors.list["data"].each { |m| puts "#{m['name']} #{m['status']}" }
mon = wf.monitors.create(
{ name: "example.com", type: "http", target: "https://example.com",
interval: 300, locations: ["<location-id>"] }, # from wf.locations
idempotency_key: "create-example-1"
)
wf.incidents.list(status: "firing")["data"].each { |i| puts i["message"] }
Namespaces: wf.monitors, wf.alert_rules, wf.incidents,
wf.maintenance_windows, wf.contacts, wf.contact_groups. Top-level:
wf.summary, wf.plan, wf.me, wf.locations, wf.monitor_types,
wf.incident_stats(period), wf.notifications, wf.activity. Errors raise
Watchfor::Error with #status, #code, #message.
CLI
export WATCHFOR_API_KEY=wf_live_...
watchfor summary
watchfor monitors
watchfor incidents
watchfor checks <monitor_id>
Reference: https://watchfor.io/openapi.json · https://watchfor.io/docs/api
MIT License.