There was a discussion in Move all files to disk plot, remove `--base-path` and `--plot-size` from farmer by nazar-pc · Pull Request #1778 · subspace/subspace · GitHub about CLI syntax for farmer and I agree it could use an improvement.
What we have right now is this:
subspace-farmer --tmp=S farm --reward-address=X
subspace-farmer --farm path=/path1,size=S --farm path=/path2,size=S farm --reward-address=X
subspace-farmer --farm path=/path1,size=S --farm path=/path2,size=S info
subspace-farmer --farm path=/path1,size=S --farm path=/path2,size=S wipe
There were a few awkward things noted:
--farm ... farm(farmis used twice)sizehas no effect on anything ininfoandwipecommands
I was thinking about introducing scrub command (see Checksummed farmer data · Issue #1723 · subspace/subspace · GitHub) and I think it might make sense to move --farm to arguments of the command instead (it was to the left because we had --base-path in the past that had defaults and subspace-farmer farm --reward-address X looked elegant).
Here is what I am proposing now:
subspace-farmer farm --reward-address=X --tmp=S
subspace-farmer farm --reward-address=X path=/path1,size=S path=/path2,size=S
subspace-farmer info /path1 /path2
subspace-farmer wipe /path1 /path2
subspace-farmer scrub /path1 /path2
So first of all individual farms become just positional arguments. They are the main argument in farming, so it kind of makes sense to not require --farm, --disk, --plot or anything else.
Other commands will also take farms as positional arguments, but will not require size or any special syntax for them.
What do you folks think about this, does it seem logical and/or convenient to you, what would you suggest as a better alternative?
P.S. Yes, you can use = and interchangeably there, I just wanted to clarify the distinction between named and positional arguments in examples.