CLI overview¶
Every er-smart-sync invocation starts with the same shape:
Global flags¶
| Flag | Description |
|---|---|
--verbose, -v |
Enable DEBUG logging from er_smart_sync (noisy libraries stay at WARNING). |
--dry-run |
Log intended writes without sending them to ER or the message broker. Reads still hit EarthRanger. |
--network-timeout SECONDS |
Process-wide ceiling on blocking socket operations. Default 600s. Pass 0 to disable and rely on each library's own timeouts. Also configurable via ER_SMART_SYNC_NETWORK_TIMEOUT. |
--help |
Show help for main or any subcommand. |
Subcommands¶
| Subcommand | What it does |
|---|---|
datamodel |
Push a SMART data model into EarthRanger as event categories and event types. |
choices |
Upsert SMART option sets as EarthRanger Choice records (v2 prerequisite). |
inspect-datamodel |
Preview what datamodel would push, without making writes. |
events |
Poll events from EarthRanger and publish them via the message broker. |
patrols |
Poll patrols from EarthRanger and publish them via the message broker. |
validate-config |
Check that SMART and EarthRanger credentials work. |
list-cas |
List the conservation areas available on a SMART server. |
config-template |
Print a fully-commented YAML config template. |
Common patterns¶
Get help on a subcommand:
Run with verbose logging:
Preview before writing:
Override the network timeout for a long-running sync:
Exit codes¶
- 0 — success (or success with skipped/errored counts > 0; check the summary line).
- non-zero — usage error, fatal exception, or
choices/datamodelhad errored counts that triggered an explicit ClickException.