Skip to content

CLI reference

Terminal window
python -m src [flags]
FlagDescription
--task NAMETask label recorded in inventory (e.g. SNMPV3, SYSLOG, BACKUP)
--commands NAMECommand file prefix to load (e.g. snmpv3{vendor}/snmpv3.txt)
--ip IPSingle device IP — use with --vendor
--vendor VENDORVendor for --ip mode: cisco, alcatel, alcatel_wlc
--devices FILEDevice CSV file (e.g. config/devices.csv)
--retryRetry failed devices from config/failed_devices.csv
--workers NParallel SSH connections (default: max_workers from config.yaml)
--backupSave full running-config per device to BACKUP/YYYY-MM/
--dry-runShow what would run without connecting to any device
--validateValidate device list and command files — no SSH connections
--logEnable SSH session logging to LOGS/
--status-file FILEUpdate Status column to Configured in a monitoring CSV
--consolidateMerge all SUMMARY CSVs into SUMMARY/CONSOLIDATED_SUMMARY.csv
--report [FILE]Generate report from a SUMMARY CSV (omit FILE for latest)
--format csv|jsonSummary output format (default: csv)
--retention DAYSBackup retention in days (0 = keep all)
--diff FILE1 FILE2Compare two config files line by line
--health-checkSSH health check on all devices — no config changes
--baseline VENDORRun CIS compliance check against backup configs

Each worker is one simultaneous SSH connection.

Workers10,000 devices @ 30 s each
10~8.3 hours
20~4.2 hours
30~2.8 hours
50~1.7 hours

Start with --workers 20. Set a permanent default in config.yaml:

execution:
max_workers: 20
Terminal window
# Single device test
python -m src --task SNMPV3 --commands snmpv3 --ip 10.0.0.1 --vendor cisco
# Subset test before full rollout
python -m src --task SNMPV3 --commands snmpv3 --devices config/testdata_devices.csv
# Full rollout
python -m src --task SNMPV3 --commands snmpv3 --devices config/devices.csv --workers 20
# Retry failures
python -m src --task SNMPV3 --commands snmpv3 --retry --workers 10
# Backup all running-configs
python -m src --task BACKUP --commands backup --backup --devices config/devices.csv --workers 20
# Dry run — preview without connecting
python -m src --task SNMPV3 --commands snmpv3 --devices config/devices.csv --dry-run
# Update monitoring CSV after successful run
python -m src --task SNMPV3 --commands snmpv3 --devices config/devices.csv --workers 20 --status-file data/dataswitches.csv