Add the ability to save default values for CLI flags into config #6502
Labels
kind/enhancement
A net-new feature or improvement to an existing feature
topic/commands
Topic commands
topic/config
Topic config
There are some command line flags that I always use, for example, when setting up and running a package manager mirror you might run the following command:
Similarly, if you're using a different chunker or hash function for a project, you'll want to pass the same
--hash
or--chunker
to every command.It'd be great you a user could set default values for those flags in their ipfs config. Perhaps under a
Flags
namespace?ipfs config add Flags.cid-version 1 ipfs config add Flags.hash blake2b ipfs config add Flags.raw-leaves true
I'd imagine if a user had a default value for a flag set in their config but passed a different value for that flag via the CLI then the passed value with override the default.
If this functionality existed, we could further extend it's usage to allow profiles to also add a number of default flag values, for example if there was some kind of
package-manager-mirror
profile that set a number of default flag values that had been found to be the best set of options for working with large linux package manager repositories.Using a profile rather than just advising users which flags to set would allow us to improve/tune the profile in later releases and transparently migrate users on that profile to the best options for their use case when upgrading to the next version of IPFS.
The text was updated successfully, but these errors were encountered: