CLI Reference¶
Program¶
argus — installed as a console script via pyproject.toml ([project.scripts] argus = "main:main").
If running from source without installing:
Usage¶
Flags¶
| Flag | Type | Default | Description |
|---|---|---|---|
--gui |
bool (store_true) |
false |
Enable live OpenCV display windows — one per camera. Each window shows the stream with bounding box overlays on detected faces. |
--config |
Path |
config/ |
Path to the configuration directory containing cameras.toml and webhooks.toml. |
--targets |
Path |
targets/ |
Path to the targets directory containing face reference data. |
All flags are optional. Running bare argus or python main.py starts in headless mode with default paths.
Examples¶
Headless mode — silent, unattended. The default.
GUI mode — see what Argus sees. One window per camera.
Custom config and targets paths:
Running from outside the project directory:
Using the installed console script after uv sync:
Direct Python invocation:
Startup Output¶
On launch, Argus prints the ASCII banner to stderr, then loads components in order:
_
/ \ _ __ __ _ _ _ ___
/ _ \ | '__/ _` | | | / __|
/ ___ \| | | (_| | |_| \__ \
/_/ \_\_| \__, |\__,_|___/
|___/
All-Seeing Surveillance System
Followed by log output:
Loaded N camera(s) from config/cameras.toml— camera countWebhook '...' loaded: https://...— per-webhook load confirmationConfiguration loaded: N camera(s), N webhook(s)— summaryLoading targets from targets/— target directory scanTarget '...' loaded with N encoding(s)— per-target encoding countLoaded N target(s) with N total encoding(s)— target summaryStarting Argus: N camera(s), N target(s), N webhook(s)— final summary before entering the main loop
If no targets are found: No targets loaded — Argus will detect faces but cannot identify anyone
Exit Behavior¶
Graceful shutdown:
Ctrl+C(SIGINT) — Argus stops all stream threads and exits cleanly'q'key in GUI mode — closes all display windows and exits
Error exits (code 1):
| Condition | Error Message |
|---|---|
| Config directory not found | Configuration error: Camera config not found: config/cameras.toml |
| No cameras defined | Configuration error: No cameras defined in cameras.toml |
Camera missing url |
Configuration error: Camera 'cam_01' is missing required 'url' field |
| Invalid settings values | Configuration error: frame_scale must be in (0, 1], got 0.0 |
Targets Directory Behavior¶
| Condition | Behavior |
|---|---|
| Targets directory not found | Warning logged, zero targets loaded, Argus continues (detect-only mode) |
Target directory missing info.json |
Warning logged, that target skipped |
Target info.json has no images |
Warning logged, that target skipped |
| Target image file not found | Warning logged, that image skipped, other images still processed |
| No face detected in an image | Warning logged, encoding skipped, other images still processed |
| Multiple faces in an image | Warning logged, first face is used, other faces ignored |
| All images for a target fail | Error logged, that target skipped entirely |