ECPDAP (also available on crates.io) is a Rust command-line utility to program ECP5 FPGAs and attached SPI flashes over JTAG, using CMSIS-DAP probes in JTAG mode.
CMSIS-DAP probes are widely available, both as firmwares for common development boards and as dedicated hardware, including my own FFP project. Since they can perform arbitrary JTAG sequences quite efficiently, they also make good programming devices for ECP5 hardware.
ECPDAP also has extensive SPI flash support including reading SFDP parameters.