Command-line interface reference for Count-Cups.
Count-Cups can be run from the command line with various options to customize behavior.
python -m app.main [OPTIONS]Enable debug mode with verbose logging.
python -m app.main --debugEffect: Sets log level to DEBUG and enables debug mode.
Set the logging level.
python -m app.main --log-level DEBUGDefault: INFO
Options:
DEBUG: Detailed debugging informationINFO: General informational messagesWARNING: Warning messagesERROR: Error messages onlyCRITICAL: Critical errors only
Set the application theme.
python -m app.main --theme darkDefault: auto
Options:
auto: Auto-detect system themelight: Light themedark: Dark themedracula: Dracula theme
Set the detection engine.
python -m app.main --detection-engine mediapipeDefault: heuristics
Options:
heuristics: Fast heuristic-based detection (default)mediapipe: Advanced MediaPipe-based detection (requires MediaPipe)
Specify which camera device to use.
python -m app.main --camera-index 1Default: 0
Note: Use 0 for default camera, 1 for second camera, etc.
Run without camera (for testing).
python -m app.main --no-cameraUse Case: Testing without camera access or running in headless mode.
Show version information and exit.
python -m app.main --versionOutput: Count-Cups 1.0.0
python -m app.mainpython -m app.main --debugpython -m app.main --theme dark --detection-engine mediapipepython -m app.main --camera-index 1 --debug --log-level DEBUGpython -m app.main --no-camera --debugCommand-line arguments can be overridden by environment variables. See Configuration Guide for details.
0: Success1: Error (missing dependencies, fatal error)
#!/bin/bash
# Launch Count-Cups with custom settings
python -m app.main \
--theme dark \
--detection-engine heuristics \
--camera-index 0 \
--log-level INFO# Launch Count-Cups with custom settings
python -m app.main `
--theme dark `
--detection-engine heuristics `
--camera-index 0 `
--log-level INFO@echo off
REM Launch Count-Cups with custom settings
python -m app.main ^
--theme dark ^
--detection-engine heuristics ^
--camera-index 0 ^
--log-level INFOIssue: python: command not found
Solution:
- Use
python3instead ofpython - Add Python to PATH
- Use full path to Python executable
Issue: ModuleNotFoundError: No module named 'app'
Solution:
- Ensure you're in the project root directory
- Activate virtual environment
- Install dependencies:
pip install -r requirements.txt
Issue: Camera not detected
Solution:
- Check camera permissions
- Try different camera index:
--camera-index 1 - Verify camera is not in use by other applications
- Configuration: See Configuration Guide for settings
- Usage: Check Usage Guide for application usage
- API: See API Reference for programmatic access
CLI Reference complete! Use command-line options to customize Count-Cups behavior.