trueblocks-core
trueblocks-core copied to clipboard
Steal IPFS config command
IPFS has an amazing config command that allows two wonderful things:
ipfs config editwhich uses the EDITOR enviornment variable to open the config file. Super simple - very useful - only run if we're in a terminal (shows the need for a isTerminal() go routineipfs config Section.Key <value>For example:chifra config chains.mainnet.rpcProvider <whatever>.
This is super useful because it allows configuration by script and also configuration by web page.
@dszlachta I just wanted you to see this. Some day we will do this. It's so useful in IPFS we should do it. It would be easy.
I'd add printing values, too: chifra config settings.indexPath => /some/directory
It would make our docs and communication with the users easier, because instead of telling them to "check where your index is" you could just send them a command:
cp -R `chifra config settings.indexPath`/unchained ~/backupcurl --data $RPC_COMMAND `chifra config chains.mainnet.rpcProvider`
I'd add printing values, too:
chifra config settings.indexPath=>/some/directoryIt would make our docs and communication with the users easier, because instead of telling them to "check where your index is" you could just send them a command:
cp -R `chifra config settings.indexPath`/unchained ~/backupcurl --data $RPC_COMMAND `chifra config chains.mainnet.rpcProvider`
Exactly. IPFS calls it show.
This will get done one day, we don't need to remember it here.