Small Hours

Open Source DevOps Agent

The Night Watch agent can run diagnostics, inspect cloud and log signals, and correlate issues with code changes.

Install globally

go install github.com/samirkhoja/night-watch/cmd/nwatch@latest

Quick Start

nwatch setupnwatchnwatch ask "check recent errors and correlate with commits"

Requirements

  • Go 1.23+
  • One provider key: OPENAI_API_KEY, ANTHROPIC_API_KEY, or GOOGLE_API_KEY
  • Optional cloud CLIs: aws, gcloud, sentry-cli

CLI Usage

nwatch [flags]nwatch [flags] setupnwatch [flags] chatnwatch [flags] ask <prompt>nwatch [flags] runbook <command>nwatch --continuenwatch --max-steps 12

Runtime Commands

/setup/reset/exit

Continue a prior session with `nwatch --continue`.

Runbook Management

nwatch runbook install ./runbooksnwatch runbook install https://github.com/acme/runbooks.git --ref v1.2.0 --subdir docs/incidentsnwatch runbook listnwatch runbook inspect aws-incidentsnwatch runbook remove aws-incidents

Config + Test

~/.config/night-watch/config.json.nightwatch/settings.json.nightwatch/settings.local.json--config /path/to/file.jsonGOCACHE=/tmp/gocache go test ./...