Skip to main content

cctv-cli

Node.js command-line tool for capturing and streaming CCTV video frames to the CROW platform. Runs on-premise alongside CCTV cameras and sends frames to the cctv-ingest-service for AI analysis.

Package name: @crow/cctv-cli Type: Node.js CLI (not a Cloudflare Worker)

Technology

  • Runtime: Node.js
  • CLI Framework: Commander.js
  • WebSocket: ws library for real-time frame streaming
  • Output: Chalk for colored terminal output

Installation

cd cctv-cli
npm install
npm link

Usage

The CLI captures video frames from a connected camera or video file and streams them to the CCTV ingest service endpoint.

crow-cctv --api-key crow_... --endpoint https://api.crowai.dev/api/v1/cctv

Configuration

OptionDescription
--api-keyCROW API key (crow_...) for authentication
--endpointCCTV ingest service URL
--camera-idCamera identifier
--intervalFrame capture interval in milliseconds

Authentication

The CLI authenticates using a CROW API key. The key is passed to the cctv-ingest-service, which verifies it against the auth service via the gateway.

Data Flow

  1. CLI captures a video frame from the camera
  2. Frame is base64-encoded
  3. Frame is sent to POST /api/v1/cctv/frames or via WebSocket
  4. CCTV ingest service runs vision analysis
  5. Results are dispatched to interaction and pattern queues

Dependencies

  • Outbound: cctv-ingest-service (frame submission via HTTP or WebSocket)