hydra-cli 1.0.4

CLI for Hydra — reads network descriptions from files, writes results to files
hydra-cli-1.0.4 is not a library.

hydra-cli

Crates.io License: AGPL v3 Cargo CI

Command-line interface for Hydra — reads EPANET .inp network descriptions from files or HTTP URLs, runs extended-period hydraulic and water quality simulation, and writes results to .rpt and .out files.

→ Full documentation

Install

For most users, Cargo install is the recommended path.

Option 1 — Pre-built binary (no Rust required)

Download the hydra binary for your platform from the releases page.

macOS — Pre-built CLI binaries are currently not notarised. If Gatekeeper blocks the binary, remove the quarantine flag:

xattr -d com.apple.quarantine hydra

Option 2 — Cargo (recommended)

cargo install hydra-cli

Usage

# Run a simulation — report goes to stdout
hydra network.inp

# Write report and binary output to files
hydra network.inp report.rpt output.out

# Named flags (equivalent)
hydra --input network.inp --report report.rpt --output output.out

# Accept an HTTP URL as input
hydra https://example.com/network.inp

# JSON report
hydra network.inp --report report.json

# Suppress progress output
hydra -q network.inp

# Print version
hydra -v

Exit codes

Code Meaning
0 Simulation completed (warnings may appear in the report)
1 Input validation error (bad INP, HTTP 4xx, missing file)
2 Solver error (non-convergence or singularity)
3 I/O error (file not found, permission denied, HTTP 5xx, network)

License

AGPL v3 — see COMMERCIAL_LICENSE.md for commercial licensing options.