A TOML file records a run, so you can keep it in Git and repeat it exactly. The same file works on the command line and in Python (MeshSpec).
The file
cell_size=32.0transition_rows=[1,2]water_removal="centre"output="mesh_net.nc"[domain]path="model.gpkg"layer="modelgebied"[[refinement_areas]]path="model.gpkg"layer="verfijning"level="refinement"# a column name, or one integer level[[water_areas]]path="model.gpkg"layer="water"
Paths are relative to the TOML file. Other keys: crs (for layers without CRS), origin = [x, y] (a lattice point) and more [[refinement_areas]] or [[water_areas]] tables. An unknown key or an invalid value is an error that names the key and the reason.
Options override the file: -o other_net.nc, --cell-size 25, --transition-rows 1 1, --water-removal inside, --crs EPSG:28992, --origin 155000 463000, and -v prints the progress.
The exit code is 0 when the mesh is written, 1 when the run failed (the orthogonality repair did not close; then mesh_net_raw.nc and mesh_net_problems.gpkg are written next to the output) and 2 for invalid input or arguments.
Look at a mesh
refined-quads info shows the lattice, the cells per refinement level and the checks of any UGRID file, also a D-HYDRO net file with a 1D network: