Did something similar with my pokemon emerald randomizer. This parses output of wasm/wasi program's --help output and generates a web interface https://cloudef.github.io/pokeemerald-randomizer/ the aruments are then passed to the wasi/wasm binary to generate the final rom.