Getting started / Quickstart

Quickstart

Install the agent, watch it handle simulated faults, then point it at a real log. About five minutes, no account needed.

Before you start
macOS (Apple Silicon) or LinuxOllama running on 127.0.0.1610 MB–3.5 GB free disk for the modelNo accounts, no API keys

1Install Nightwatch

The installer installs nightwatch and the embedded ClickHouse library into ~/.nightwatch, symlinks nightwatch onto your PATH (/opt/homebrew/bin, /usr/local/bin, or ~/.local/bin), and downloads & SHA-256-verifies the specialist model that fits your RAM from Hugging Face.

shell
curl -fsSL https://raw.githubusercontent.com/barbarosydev/nightwatch-agent/main/install.sh | sh

Want a smaller model tier (balanced, small, tiny, or all), model-only setup (--model-only), or an offline local install? See Models.

2Check everything is ready

Doctor confirms the binary is on your PATH, and checks Ollama, the specialist model, the embedded database, and your policy file before anything runs.

$ nightwatch doctor
ok   ollama      127.0.0.1:11434
ok   model       nightwatch-gemma4-e2b (3.46 GB)
ok   database    ~/.nightwatch/audit (ClickHouse, embedded)
ok   policy      ~/.nightwatch/policy.yaml (default)
off  paging      no Vonage credentials, offline only

3Run the simulator

The simulator streams calm station heartbeats and injects one fault every 60 seconds by default — mostly routine AUTO recoveries (~85%) with rare ASK or NEVER escalations (~15%) so it never floods your phone.

shell
nightwatch run --simulator
02:14:03 burst  bay-sim   7 lines, root at line 3
02:14:03 AUTO   free_disk(mount="/var/spool/offload")      198 ms
04:12:02 ASK    quarantine_upload(file_id="bundle-91c0")   205 ms  held
05:05:02 BLOCK  restart_service(service="sshd")           189 ms  escalated

Prefer zero automatic faults while testing approvals? Pass --interval 0 (manual console injection only), or click Pause random faults in the simulator bar.

4Open the local console

While it runs, the console at http://127.0.0.1:8000 shows live decisions, pending 2FA approvals, the 24-hour report, and a read-only ClickHouse SQL explorer. It loads nothing from the internet.

Nightwatch local console at 127.0.0.1:8000 showing live station log stream, root-cause decision JSON, guardrail checks, and policy lane

5Connect a real log

Give it a file to follow (or --source - to pipe from journalctl -f) and a station name. Start with --dry-run to inspect decisions without acting on them.

shell
nightwatch run --source /var/log/offload.log --station bay-04 --dry-run

Troubleshooting

SymptomFix
nightwatch: command not foundOn macOS/Linux without a writable standard bin directory, the installer appends ~/.nightwatch/bin to your shell profile. Open a new terminal or run export PATH="$HOME/.nightwatch/bin:$PATH" (or symlink into /opt/homebrew/bin/nightwatch).
ollama unreachable at 127.0.0.1:11434Start Ollama (ollama serve or open the Ollama macOS app), then re-run nightwatch doctor.
libchdb.so not foundRe-run install.sh --skip-model to fetch the platform ClickHouse shared library into ~/.nightwatch/lib/libchdb.so.
Port 8000 already in useStart with nightwatch run --simulator --addr 127.0.0.1:8080 (or --no-ui for headless mode).

Nothing leaves the machine by default. SMS and voice paging stay off until you add Vonage credentials, and even then pages carry no log text.

Next steps