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:
wslibrary 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
| Option | Description |
|---|---|
--api-key | CROW API key (crow_...) for authentication |
--endpoint | CCTV ingest service URL |
--camera-id | Camera identifier |
--interval | Frame 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
- CLI captures a video frame from the camera
- Frame is base64-encoded
- Frame is sent to
POST /api/v1/cctv/framesor via WebSocket - CCTV ingest service runs vision analysis
- Results are dispatched to interaction and pattern queues
Dependencies
- Outbound: cctv-ingest-service (frame submission via HTTP or WebSocket)