Documentation

InariWatch Docs

Everything you need to set up InariWatch — web dashboard, local CLI, integrations, and AI.

Web dashboard

The web dashboard is the fastest way to get started — no install, no card required. Sign up, connect your first integration, and InariWatch starts monitoring in minutes.

  1. 1

    Create an account

    Go to inariwatch.com/register and sign up with GitHub or email.
  2. 2

    Create a project

    A project groups your integrations and alerts. Give it the name of your app or service.
  3. 3

    Connect an integration

    Go to Integrations and connect GitHub, Vercel, or Sentry. See the integration guides below for exactly which token to use.
  4. 4

    (Optional) Add your AI key

    Go to Settings → AI analysis and paste your API key. See AI setup for all supported providers.
Note: The InariWatch Cloud Dashboard polls connected services every 5 minutes (uptime checks every 1 minute) to detect issues instantly.

Local CLI

The CLI runs entirely on your machine — no account needed, data stays local. It's the best option if you prefer a terminal workflow or want zero cloud dependency.

Install
curl -fsSL https://get.inariwatch.com | sh
  1. 1

    Create a project

    inariwatch init — walks you through creating a local project interactively.
  2. 2

    Add an integration

    inariwatch add github — prompts for your token and owner. Repeat for vercel, sentry, etc.
  3. 3

    (Optional) Set an AI key

    inariwatch config --ai-key sk-ant-... — enables AI correlation and auto-remediation in the watch loop.
  4. 4

    Start watching

    inariwatch watch — polls every 60s, correlates events, and sends Telegram alerts if configured.

CLI — Installation

The CLI is a single Rust binary with no runtime dependencies.

Linux / macOS
curl -fsSL https://get.inariwatch.com | sh
Windows (PowerShell)
irm https://get.inariwatch.com/install.ps1 | iex
Build from source
git clone https://github.com/orbita-pos/inariwatch
cd inariwatch/cli
cargo build --release
# binary at: ./target/release/inariwatch

After installing, run inariwatch --help to confirm it works. On Linux/macOS the binary is placed in ~/.local/bin/inariwatch. On Windows it installs to %USERPROFILE%\.inariwatch\bin and is added to your user PATH automatically.

CLI — Commands

CommandDescription
inariwatch initCreate a new local project (interactive)
inariwatch add githubAdd GitHub integration — prompts for token + owner + repos
inariwatch add vercelAdd Vercel integration — prompts for token + team ID
inariwatch add sentryAdd Sentry integration — prompts for auth token + org slug
inariwatch add gitAdd local git integration (no token needed)
inariwatch connect telegramLink a Telegram bot for notifications
inariwatch watchMain loop — polls every 60s, sends alerts, runs AI correlation
inariwatch statusShow integration health and last poll times
inariwatch logsShow recent alerts from the local SQLite database
inariwatch config --ai-key <key>Set AI key (Claude, OpenAI, Grok, DeepSeek, or Gemini)
inariwatch config --model <model>Set the AI model
inariwatch config --auto-fix trueEnable autonomous AI fix pipeline on critical alerts
inariwatch config --auto-merge trueAuto-merge generated PRs when all safety gates pass
inariwatch config --showPrint current config (keys masked)
inariwatch daemon installRegister InariWatch as a background service (systemd / launchd / Task Scheduler)
inariwatch daemon start|stop|statusControl the background daemon
inariwatch daemon uninstallRemove the background service
inariwatch agent-statsShow AI agent track record, trust level, and auto-merge gates
inariwatch serve-mcpStart an MCP server over stdio (Claude Code, Cursor, etc.)
inariwatch rollback vercelInteractive rollback — pick a previous deployment to restore

CLI — Configuration

The CLI stores all config in two files:

FilePurpose
~/.config/inariwatch/config.tomlAI key, model, and per-project integration tokens
~/.local/share/inariwatch/inariwatch.dbSQLite — events and alerts (local history)
~/.config/inariwatch/config.toml (example)
[global]
ai_key    = "sk-ant-..."
ai_model  = "claude-haiku-4-5-20251001"
auto_fix  = false   # enable autonomous fix pipeline on critical alerts
auto_merge = false  # auto-merge PRs when all safety gates pass

[[projects]]
name = "my-app"
slug = "my-app"
path = "/home/you/projects/my-app"

[projects.integrations.github]
token         = "ghp_..."
repo          = "my-org/my-app"
stale_pr_days = 2

[projects.integrations.vercel]
token      = "..."
project_id = "prj_..."
team_id    = "team_..."   # optional

[projects.integrations.sentry]
token   = "..."
org     = "my-org"
project = "my-project"

[projects.notifications.telegram]
bot_token = "123456:ABC-..."
chat_id   = "987654321"
Note: You can edit this file directly, but using inariwatch add and inariwatch config is safer — they validate tokens before saving.

CLI — Daemon

Run InariWatch as a background service so it monitors your project 24/7 — even when your terminal is closed. It registers as a systemd user service on Linux, a launchd agent on macOS, and a Task Scheduler task on Windows.

Terminal
inariwatch daemon install   # register and enable the service
inariwatch daemon start     # start immediately
inariwatch daemon stop      # stop the service
inariwatch daemon status    # check if running + tail recent logs
inariwatch daemon uninstall # remove the service

Logs are written to ~/.inariwatch/daemon.log on all platforms. The daemon runs inariwatch watch in the background — any config you set with inariwatch config applies to it automatically.

CLI — Auto-fix & Auto-merge

When auto_fix is enabled, every critical alert automatically triggers the full AI remediation pipeline: diagnose → read code → generate fix → self-review → push branch → wait CI → open PR. No human needed until the PR appears.

Terminal
inariwatch config --auto-fix true    # enable autonomous fix pipeline
inariwatch config --auto-merge true  # also merge PRs when all safety gates pass

auto_merge requires auto_fix to be enabled. Even then, a PR is only merged when all 5 safety gates pass: CI green, confidence ≥ 90%, self-review score ≥ 70, lines changed ≤ 50, and trust level ≥ Apprentice.

Note: Use inariwatch agent-stats to see the AI's track record, current trust level, and which gates apply at your trust level. The agent earns relaxed gates as it accumulates successful fixes.
Trust levelRequiresAuto-merge gates
Rookie0 fixesNever auto-merges
Apprentice3 fixes, ≥ 50% successConf ≥ 90, lines ≤ 50
Trusted5 fixes, ≥ 70% successConf ≥ 80, lines ≤ 100
Expert10 fixes, ≥ 85% successConf ≥ 70, lines ≤ 200

CLI — MCP Server

InariWatch exposes an MCP (Model Context Protocol) server that gives your AI editor direct access to your alerts, integrations, and infrastructure actions — without leaving your code. Works with Claude Code, Cursor, Windsurf, VS Code, and any MCP-compatible client.

The MCP server has two tiers of tools: read tools to query alerts and run checks, and action tools that let the AI autonomously fix issues, roll back deploys, and silence alerts.

Connecting to your editor

Add InariWatch to your .mcp.json (project-level) or your editor's global MCP config:

.mcp.json
{
  "mcpServers": {
    "inariwatch": {
      "command": "inariwatch",
      "args": ["serve-mcp"]
    }
  }
}

For Cursor: Settings → MCP → Add server → paste the config above.
For Claude Code: save as .mcp.json in your project root or ~/.claude/settings.json globally.
Then reload your editor — InariWatch starts automatically when the AI needs it.

Available tools

ToolTypeDescription
query_alertsreadFetch recent alerts from local DB. Filterable by project, severity, and limit.
get_statusreadList configured projects and active integrations.
run_checkreadTrigger one monitoring cycle and return any new alerts found.
get_root_causeactionDeep AI analysis of an alert: root cause, confidence, impact, and prevention steps. Pulls context from Sentry, Vercel, and GitHub in parallel.
trigger_fixactionFull autonomous remediation: diagnose → read code → AI fix → self-review → branch → CI wait → PR → optional auto-merge. Supports dry_run to preview without side effects.
rollback_vercelactionRoll back a Vercel project to the last successful production deployment. Accepts an optional deployment ID.
get_build_logsactionFetch Vercel build logs for a deployment with error extraction. Defaults to the latest failed deploy.
silence_alertactionMark an alert as read in the local database.
Pro tip: With the MCP server active you can tell your editor: “Fix that Sentry error” — the AI will call query_alerts to find it, then trigger_fix to diagnose, generate a fix, push a branch, wait for CI, and open a PR — all without leaving your editor.

CLI — Rollback

When a bad deploy reaches production, inariwatch rollback vercel gives you an interactive list of your last 10 successful deployments so you can pick one and restore it in seconds.

Terminal
inariwatch rollback vercel

Fetching recent successful deployments for my-app…
? Roll back to which deployment?
> dpl_abc123 a1b2c3d (main) — fix: remove debug log — 2h ago
  dpl_def456 e4f5g6h (main) — feat: add dark mode  — 5h ago
  dpl_ghi789 i7j8k9l (main) — chore: bump deps     — 1d ago

  Deploy:  dpl_abc12345
  Branch:  main
  Commit:  a1b2c3d
  URL:     https://my-app.vercel.app

? Confirm rollback to production? (y/N) y
Rolling back…
✓ Rollback triggered!
  Live at: https://my-app.vercel.app
Note: The confirmation prompt defaults to No — you have to explicitly type y to proceed. This prevents accidental rollbacks.

Integration — GitHub

InariWatch uses a GitHub Personal Access Token (classic or fine-grained) to monitor CI runs, PRs, and commits.

Getting a token

  1. 1

    Go to GitHub → Settings → Developer settings → Personal access tokens

  2. 2

    Create a new token (classic)

    Click Generate new token → Classic.
  3. 3

    Select scopes

    ScopeWhy
    repoRead CI runs, PRs, and commits on private repos
    read:orgRead org membership (if monitoring an org)
    read:userIdentify the token owner for auto-detection
  4. 4

    Copy the token

    The token starts with ghp_. Paste it into InariWatch.

What InariWatch monitors

AlertSeverityDefault
Failed CI check on main/masterCriticalOn
Failed CI on any branchWarningOff
Stale PR (configurable days)WarningOn — 3 days
Unreviewed PR (configurable hrs)WarningOn — 24 hrs
Pre-deploy risk score on PRInfoOn (Requires AI key)
Pro tip: The owner field should be your GitHub username or org name — InariWatch uses it to scope which repos to watch.

Integration — Vercel

InariWatch monitors your Vercel deployments and can trigger instant rollbacks on production failures.

Getting a token

  1. 1

    Open Vercel → Account Settings → Tokens

  2. 2

    Create a token

    Give it a name like inariwatch. No expiry is easiest for long-term monitoring.
  3. 3

    (Optional) Find your Team ID

    Go to your Vercel team → Settings. The team ID is shown as team_.... Leave blank if you're on a personal account.

What InariWatch monitors

AlertSeverityDefault
Failed production deploymentCriticalOn
Failed preview deploymentWarningOff
Instant rollbackOn demand

Integration — Sentry

InariWatch polls Sentry every 5 minutes for new issues and regressions in your projects.

Getting a token

  1. 1

    Open Sentry → Settings → Auth Tokens

  2. 2

    Create an internal integration token

    PermissionAccess
    Issues & EventsRead
    ProjectRead
    OrganizationRead
  3. 3

    Find your org slug

    It's in the URL of your Sentry dashboard: sentry.io/organizations/my-org/

What InariWatch monitors

AlertSeverityWindow
New issue first seenWarningLast 10 min
Regression (re-opened)CriticalLast 10 min

Integration — Uptime

Uptime monitoring checks your HTTP endpoints at every poll interval and alerts if they return a non-2xx status or respond slower than your threshold.

In the web dashboard, go to Integrations → Uptime → Configure and add your endpoints. Each endpoint has a URL and an optional response time threshold in milliseconds.

AlertSeverity
Endpoint returned non-2xxCritical
Response time exceeded thresholdWarning
Endpoint recoveredInfo
Note: No token required. InariWatch makes the HTTP requests from its own infrastructure.

Integration — PostgreSQL

InariWatch connects to your PostgreSQL database and monitors for health issues without storing your data.

You only need a read-only connection string. InariWatch runs read-only diagnostic queries — it never writes to your database.

Connection string format
postgresql://user:password@host:5432/dbname?sslmode=require
AlertSeverityThreshold
Connection failureCriticalAny failure
Too many active connectionsWarning> 80% of max_connections
Long-running queryWarning> 60 seconds
Replication lagWarning> 30 seconds
Warning: Create a dedicated read-only user for InariWatch. Never use a superuser connection string in a third-party service.
Create a read-only user (run in psql)
CREATE USER inariwatch WITH PASSWORD 'your-password';
GRANT CONNECT ON DATABASE your_db TO inariwatch;
GRANT USAGE ON SCHEMA public TO inariwatch;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO inariwatch;

Integration — npm / Cargo

InariWatch audits your package.json or Cargo.toml for known vulnerabilities using the npm and RustSec advisory databases.

Provide a public URL to your manifest file. For private repos, use a raw GitHub URL with a Personal Access Token in the request (paste the full URL including auth).

Example public URLs
# npm
https://raw.githubusercontent.com/my-org/my-app/main/package.json

# Cargo
https://raw.githubusercontent.com/my-org/my-app/main/Cargo.toml
AlertSeverity
Critical CVE foundCritical
High-severity CVE foundWarning
Moderate CVE foundInfo

Integration — Datadog

InariWatch receives alerts from Datadog monitors via webhooks. When your Datadog monitor triggers (log anomaly, infrastructure spike, APM error), InariWatch creates an alert and optionally runs AI remediation — bridging the gap between detection and resolution.

Getting your keys

  1. 1

    Open Datadog → Organization Settings → API Keys

  2. 2

    Copy your API Key

    This is your organization's API key. It starts with a hex string.
  3. 3

    Create an Application Key

    Go to Application Keys tab and create a new key. Give it a name like inariwatch. Copy the key — it's only shown once.
  4. 4

    Connect in InariWatch

    Go to Integrations → Datadog → Connect. Paste both keys. InariWatch validates your API key automatically.

Setting up the webhook

After connecting, InariWatch generates a unique Webhook URL for your project. You need to configure this URL in Datadog so monitors can send alerts to InariWatch.

  1. 1

    Copy the Webhook URL from InariWatch

    It's shown under the Datadog integration card after connecting. Looks like: https://app.inariwatch.com/api/webhooks/datadog/your-integration-id
  2. 2

    Open Datadog → Integrations → Webhooks

  3. 3

    Create a new webhook

    Name it inariwatch, paste the Webhook URL, and leave the payload as the default JSON. Click Save.
  4. 4

    Add the webhook to your monitors

    Edit any Datadog monitor → Notify your team section → type @webhook-inariwatch. Now that monitor will alert InariWatch when it fires.

What InariWatch receives

Datadog EventInariWatch Severity
Monitor status: Alert / ErrorCritical
Monitor status: WarnWarning
Monitor status: Recovered / OKSkipped (auto-resolved)
Pro tip: Datadog sends a "Recovered" event when a monitor goes back to OK. InariWatch automatically ignores these so you don't get noise from self-healing issues.

AI setup — Overview (BYOK)

InariWatch uses a Bring Your Own Key model. Your API key goes directly from your browser to your AI provider — InariWatch never stores or proxies it (except for saving the key reference in your account so you don't have to re-enter it).

Adding an AI key unlocks:

  • AI root cause analysis on any alert
  • AI code remediation — writes the fix, pushes a branch, waits for CI, opens a PR
  • Pre-deploy PR risk scoring (GitHub integration required)
  • Auto post-mortems when an incident is resolved
  • Alert correlation — groups related alerts into one incident
  • Ask Inari — chat with your live monitoring data
Pro tip: You can add multiple providers. InariWatch uses whichever key you set as primary, with Claude preferred by default if present.

AI — Claude (Anthropic)

Claude is the recommended provider — InariWatch's AI features are tuned for Claude's output style.

  1. 1
  2. 2

    Copy the key

    Starts with sk-ant-api03-...
  3. 3

    Paste into InariWatch

    Settings → AI analysis → Add key → Select Claude.
ModelContextBest for
claude-sonnet-4-5 (recommended)200kRemediation, correlation, analysis
claude-haiku-4-5200kFast analysis, lower cost
claude-opus-4-5200kComplex repos, maximum quality
CLI
inariwatch config --ai-key sk-ant-api03-... --model claude-sonnet-4-5-20251022

AI — OpenAI

  1. 1
  2. 2

    Copy the key

    Starts with sk-proj-... (new format) or sk-... (legacy).
  3. 3

    Paste into InariWatch

    Settings → AI analysis → Add key → Select OpenAI.
ModelBest for
gpt-4o (recommended)Balanced quality and speed
gpt-4o-miniLower cost, faster responses
o1-miniComplex reasoning tasks
CLI
inariwatch config --ai-key sk-proj-... --model gpt-4o

AI — Grok (xAI)

  1. 1

    Create an API key

  2. 2

    Copy the key

    Starts with xai-...
  3. 3

    Paste into InariWatch

    Settings → AI analysis → Add key → Select Grok.
CLI
inariwatch config --ai-key xai-... --model grok-beta

AI — DeepSeek

  1. 1
  2. 2

    Copy the key

    Starts with sk-...
  3. 3

    Paste into InariWatch

    Settings → AI analysis → Add key → Select DeepSeek.
CLI
inariwatch config --ai-key sk-... --model deepseek-chat

AI — Gemini (Google)

  1. 1
  2. 2

    Copy the key

    Starts with AIza...
  3. 3

    Paste into InariWatch

    Settings → AI analysis → Add key → Select Gemini.
CLI
inariwatch config --ai-key AIza... --model gemini-2.0-flash

Notifications — Telegram

Telegram is supported in both the CLI and the web dashboard. It's the fastest setup — no server, no webhook config.

  1. 1

    Create a Telegram bot

    Open Telegram → search @BotFather → send /newbot. Copy the token it gives you.
  2. 2

    Find your chat ID

    Send a message to your bot, then open: https://api.telegram.org/bot<TOKEN>/getUpdates. The chat.id field is your ID.
  3. 3

    Connect in InariWatch

    Web: Settings → Notification channels → Telegram. CLI: inariwatch connect telegram.
CLI shortcut
inariwatch connect telegram
# Prompts for bot token and chat ID

Notifications — Email

Email delivery is handled by InariWatch — you just provide your address. Critical alerts are sent immediately; warning and info alerts are batched into a daily digest.

  1. 1

    Go to Settings → Notification channels → Email

    Enter your email address and click Send verification.
  2. 2

    Verify your address

    Click the link in the verification email. Alerts won't send until verified.
  3. 3

    Set minimum severity (optional)

    You can filter to Critical only to reduce noise.
Note: To keep InariWatch free and respect email limits, non-critical alerts are batched into daily/weekly digests. Only Critical alerts are sent immediately.

Notifications — Slack

  1. 1

    Create an Incoming Webhook in Slack

    api.slack.com/apps → Create App → From scratch → Incoming Webhooks → Add new webhook to workspace.
  2. 2

    Select a channel

    Choose the channel where alerts should appear (e.g. #incidents). Copy the webhook URL.
  3. 3

    Paste into InariWatch

    Settings → Notification channels → Slack → paste the webhook URL.

Notifications — Push (browser)

Browser push sends OS-level notifications to your desktop or mobile browser — no app needed.

  1. 1

    Go to Settings → Notification channels → Push

    Click Enable push notifications.
  2. 2

    Allow browser permissions

    Your browser will prompt to allow notifications. Click Allow.
  3. 3

    Done

    InariWatch will send a test notification immediately to confirm it works.
Warning: Push notifications only work while your browser has been opened at least once since registration. For 24/7 coverage, use Telegram or email.

Notifications — On-Call Schedules

InariWatch allows you to configure timezone-aware daily on-call rotations for your team. Instead of paging the entire team with critical alerts, Escalation Rules can dynamically route the notification to the specific developer currently on-call.

  1. 1

    Go to your Project → On-Call Schedule

    Click Add schedule and set your project's timezone.
  2. 2

    Add members to slots

    Select a user and choose their day and hour ranges (e.g. Mon-Fri, 09:00-17:00).
  3. 3

    Enable in Escalation Rules

    Escalation rules will automatically use the on-call schedule before falling back to fixed channels.
Note: A green badge will appear in the dashboard indicating exactly who is currently on-call based on the active slots.

Notifications — Schedule Overrides

Schedule Overrides let you temporarily replace the on-call person without modifying the base rotation. Perfect for sick days, vacations, or emergencies.

  1. 1

    Go to your Project → On-Call Schedule

    Find the schedule you want to override.
  2. 2

    Click 'Add Override'

    Select the substitute user and choose a start and end date/time.
  3. 3

    Done

    During the override window, the substitute receives all escalation notifications instead of the original on-call person.
Pro tip: Overrides take priority over regular slots. Once the override window expires, the schedule automatically falls back to the base rotation — no cleanup needed.

Notifications — Incident Storm Control

When a major infrastructure failure occurs (e.g. database crash), dozens of monitors can trigger simultaneously. Without grouping, the on-call engineer gets 50 notifications in seconds — causing alert fatigue and panic.

Incident Storm Control detects when more than 5 alerts arrive for the same project within a 5-minute window. Instead of sending individual notifications, InariWatch groups them into a single "Incident Storm" message:

Example Storm Notification
🚨 [INCIDENT STORM] 14 alerts detected in 5 min
Project: my-production-app

Likely a cascading failure.
Resolve the root cause — all grouped alerts will clear together.
Note: Storm detection is fully automatic — no configuration needed. All alerts within a storm are linked to the same incident ID for post-mortem analysis.

Notifications — Interactive ACK

When InariWatch sends a critical alert to Telegram, the message includes interactive inline buttons that let you take action directly from your phone:

  • 👁️ Acknowledge — Stops the escalation timer. Your team knows you're looking at it.
  • ✅ Resolve — Marks the alert as resolved. No more follow-up notifications.
  • 🔇 Snooze 30m — Silences the alert for 30 minutes, then re-alerts if still unresolved.
Pro tip: No need to open your laptop at 3 AM. Tap the button in Telegram from your bed and the escalation engine respects your acknowledgment instantly.

Desktop app — Setup & token

The InariWatch desktop app is a lightweight tray app that polls your account in the background and shows OS notifications — even when you're not in the browser.

  1. 1

    Download the desktop app

    Download the installer for your OS from the releases page. Supports macOS, Windows, and Linux.
  2. 2

    Generate a desktop token

    Go to Settings → Desktop app → Generate token. This creates a token starting with rdr_....
  3. 3

    Add the token to the config file

    Create or edit ~/.config/inari/desktop.toml with the values below.
  4. 4

    Start the app

    The tray icon appears (◉). Alerts will show as OS notifications. Click the icon to open the dashboard.
Note: The desktop app is completely free, just generate a token to connect it.

Desktop app — desktop.toml

~/.config/inari/desktop.toml
api_url   = "https://inariwatch.com"
api_token = "rdr_your_token_here"

The app polls /api/desktop/alerts every 60 seconds using this token. Alerts are shown as OS notifications and marked as read in the dashboard.

Reference — Alert types & severity

SeverityColorMeaning
CriticalRedImmediate action required — production is affected
WarningAmberDegraded state — action recommended soon
InfoBlueInformational — no immediate action needed

Deduplication

Before creating a new alert, InariWatch checks whether an open, unresolved alert with the same title already exists for the same project within the last 24 hours. If one does, the new alert is silently dropped — you won't get spammed by the same event.

To force a new alert (e.g. after resolving), mark the existing alert as Resolved first.

Reference — REST API

InariWatch exposes one public REST endpoint — used by the desktop app and any custom tooling.

GET /api/desktop/alerts

Returns the most recent unread alerts for the authenticated user.

Request
GET /api/desktop/alerts
Authorization: Bearer rdr_your_token_here
Response (200)
{
  "alerts": [
    {
      "id":          "uuid",
      "title":       "CI failing on main",
      "severity":    "critical",
      "isResolved":  false,
      "createdAt":   "2025-03-17T03:12:00Z",
      "sourceIntegrations": ["github"]
    }
  ]
}
StatusMeaning
200Success
401Missing or invalid token
403Token exists but account is not Pro