Skip to content

leglock/copilot-watcher

Repository files navigation

CopilotWatcher

Monitors the official list of GitHub Copilot models and logs whenever a model is added or removed. Built as a .NET 10 background worker that polls on a fixed wall-clock cadence (default: every hour at :00, anchored to local midnight).

Wile E. Coyote scanning the horizon with binoculars

Live footage of CheckCopilotModels between adds and removes.

How it works

Every tick, the worker:

  1. Fetches the latest model-release-status.yml from github/docs.
  2. Parses it and diffs the model list (by name) against the previous snapshot cached at ~/.copilot-watcher/models.json.
  3. Logs one Copilot model added: … or Copilot model removed: … line per change, or Copilot model list unchanged (N models). when nothing differs.
  4. Atomically rewrites the cache so the next tick compares against the most recent pull, not the original baseline.

The first run after a fresh install is a silent capture (Initial Copilot model snapshot captured …), so the worker doesn't emit 20+ "added" lines on startup. Fetch failures and corrupted caches are logged and recovered from on the next tick — they don't crash the worker.

Requirements

  • .NET 10 SDK

Run

Scheduled mode (long-running, first run at the next boundary):

dotnet run --project src/CopilotWatcher

One-shot mode (run the routine once and exit):

dotnet run --project src/CopilotWatcher -- --run-once

Run with Docker

Long-running self-host via Compose. The snapshot and log files live in a named volume so they survive container restarts:

docker compose up -d --build
docker compose logs -f copilot-watcher

Cached snapshot and logs land under /data inside the container (named volume copilot-watcher-data).

To override the schedule or wire up Pushover, copy .env.example to .env next to compose.yml and fill in the values. .env is gitignored — credentials stay on the host:

cp .env.example .env
# edit .env
docker compose up -d

Available keys (all optional; sensible defaults apply when missing):

TZ=America/New_York
Worker__IntervalHours=1
Pushover__Token=<app-token>
Pushover__User=<user-key>

Configuration

appsettings.jsonWorker:IntervalHours controls the schedule (default 1). Allowed values: 1, 2, 3, 4, 6, 8, 12, 24 (divisors of 24 so each tick lands on a clean clock-face position, anchored to local midnight). Invalid values fail fast at startup.

Override at runtime:

# Environment variable
Worker__IntervalHours=6 dotnet run --project src/CopilotWatcher

# Command-line
dotnet run --project src/CopilotWatcher -- --Worker:IntervalHours=6

Notifications (optional)

Push a notification via Pushover whenever a model is added or removed. Disabled by default: when Pushover:Token or Pushover:User is empty/missing, the worker logs as usual and sends nothing.

When both are set, each tick that finds at least one add/remove sends one summary push (title: CopilotWatcher) listing all the changes. Ticks where the list is unchanged send nothing, and the silent initial-baseline capture stays silent.

Recommended setup via User Secrets (so credentials stay out of the repo):

cd src/CopilotWatcher
dotnet user-secrets set "Pushover:Token" "<app-token>"
dotnet user-secrets set "Pushover:User"  "<user-key>"

Or via environment variables:

Pushover__Token=<app-token> Pushover__User=<user-key> dotnet run --project src/CopilotWatcher

Pushover delivery failures are logged as warnings and do not affect the check or the cache update — the next tick simply tries again.

Build

dotnet build CopilotWatcher.slnx

About

Watches the official GitHub Copilot model list and logs when models are added or removed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors