Operator CLI

The power of monitoring, now in your terminal.

Drive every operator action — view, acknowledge, dispatch, escalate — from the command line. Fast, scriptable, audit-ready.

operator-cli — zsh — 102×24
$opcli alarms --active
IDTIMEPRIORITYALARMLOCATIONSTATUS
A-1029310:21:34HIGHMotion DetectedMain EntranceNEW
A-1029210:20:11MEDIUMDoor ForcedSide DoorACK
A-1029110:19:02HIGHPanic ButtonCashier 3NEW
A-1029010:17:45LOWDevice OfflineParking Gate 2INFO
$

Why a CLI?

The Monitoring Portal is great when you're learning, or when you need visual context — a video feed, a site map, an event timeline. But for experienced operators handling dozens of events per shift, clicks are the bottleneck.

The Operator CLI lets you drive every monitoring action from your keyboard, pipe results into other tools, and script repetitive workflows. The CLI is also the fastest way for an AI agent to operate CHeKT — every command is documented, every output is machine-parsable.

Install opcli

opcli ships as a single static binary for macOS, Linux, and Windows. No runtime dependencies. Pick your preferred installer:

install
# macOS / Linux (Homebrew)
brew install chekt/tap/opcli

# Windows (Scoop)
scoop install opcli

# Or grab a static binary
curl -sSL https://get.chekt.com/cli | sh

First-run setup

On first launch, log in via OAuth. The CLI opens your browser, completes the handshake with dealer.chekt.com, and stores a short-lived token in your OS keyring.

terminal
# Authenticate (opens browser, completes OAuth on dealer.chekt.com)
opcli login

# Verify your identity
opcli whoami
# → josh@dealer-co.com · East Bay Monitoring · opcli 1.0.0

# Quick smoke test
opcli alarms --active

Anatomy of an opcli command

Every command follows the same shape: opcli <noun> [<id>] <verb> [flags]. The grammar is deliberate — once you learn the verbs, every noun follows the same pattern.

verb
What to do. Examples: list, get, acknowledge, dispatch, watch.
noun
The resource. Examples: alarms, sites, devices, cameras, incidents.
filter flags
--active, --site, --priority, --status — narrow the result set.
output format
--json or --table (default). JSON output is stable and pipe-friendly.

Common commands

The ten commands operators reach for daily — covers ~90% of shift work.

opcli alarms --activeList active alarms in real-time table view.
opcli alarms --site 'East Bay'Filter alarms by site name or ID.
opcli alarm A-10293 detailShow full alarm details with events, video, history.
opcli alarm A-10293 acknowledgeAcknowledge a specific alarm.
opcli alarm A-10293 acknowledge --reason 'false-positive'Acknowledge with an audit-logged reason.
opcli dispatch guard --to 'Main Entrance'Dispatch a responder to a location.
opcli camera 'Main Entrance' --liveOpen a live camera feed (uses mpv on Unix).
opcli incidents --todayToday's incidents grouped by site.
opcli sites list --status armedList sites currently armed.
opcli audit --operator $USER --since 24hPull the operator action audit log.

The Detect → Notify → Act → Resolve loop

Every operator workflow follows the same loop, and opcli is designed around it. Here's the loop in five steps with the actors involved.

CHeKT
opcli
Operator
  1. 01
    CHeKTopcli
    DetectAlarm fires in Central Station
  2. 02
    opcliOperator
    NotifyReal-time row in opcli watch terminal
  3. 03
    Operatoropcli
    ActAcknowledge / dispatch / escalate
  4. 04
    opcliCHeKT
    ApplyAPI call with audit trail
  5. 05
    CHeKTOperator
    ResolveIncident closed. Logged.
Figure 1. The standard operator workflow — opcli sits between CHeKT and the operator.

Watching in real time

opcli watch streams every event from your sites in a live-updating table — like top(1) for alarms. Most ops teams keep one terminal tab open with opcli watch --active all shift long.

Pipe-friendly by design

Every command supports --json, which emits a stable, documented JSON structure on stdout. This makes opcli a first-class citizen in any Unix pipeline.

bulk actions
# Acknowledge every motion alarm from one flaky sensor in a single pipe
opcli alarms --device dev_8h2j3kfm --status new --json \
  | jq -r '.[] | .id' \
  | xargs -I{} opcli alarm {} acknowledge --reason "sensor recalibration"

# Export today's incidents as CSV for a compliance report
opcli incidents --today --json \
  | jq -r '.[] | [.id, .site, .priority, .status] | @csv' \
  > incidents.csv

Scripting opcli

Bash, Python, Zig — anything that can spawn a process and read stdout works. Here's a script most ops teams run at start-of-shift to triage overnight events.

nightly-health.sh
1#!/usr/bin/env bash
2# nightly-health.sh — run every morning at start-of-shift
3set -euo pipefail
4
5echo "== Devices offline overnight =="
6opcli devices --status offline --since 12h --json \
7  | jq -r '.[] | "\(.site_name): \(.name) — offline since \(.last_seen_at)"'
8
9echo
10echo "== Unacknowledged high-priority alarms =="
11opcli alarms --status new --priority high --json \
12  | jq -r '.[] | "[\(.id)] \(.site_name): \(.alarm_type)"'

opcli + AI agents

The CLI ships with an --mcp flag that exposes every command as an MCP tool. Drop the binary into Claude Desktop, ChatGPT desktop, or your own agent loop — and an LLM can drive CHeKT the same way an operator does.

See the MCP page for setup, or the production workflows guide for real examples.

Next steps