trueblocks-core icon indicating copy to clipboard operation
trueblocks-core copied to clipboard

Steal IPFS config command

Open tjayrush opened this issue 3 years ago • 3 comments

IPFS has an amazing config command that allows two wonderful things:

  1. ipfs config edit which 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 routine
  2. ipfs 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.

tjayrush avatar Sep 13 '22 13:09 tjayrush

@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.

tjayrush avatar Sep 13 '22 13:09 tjayrush

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 ~/backup
  • curl --data $RPC_COMMAND `chifra config chains.mainnet.rpcProvider`

dszlachta avatar Sep 21 '22 09:09 dszlachta

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 ~/backup
  • curl --data $RPC_COMMAND `chifra config chains.mainnet.rpcProvider`

Exactly. IPFS calls it show.

tjayrush avatar Sep 21 '22 10:09 tjayrush

This will get done one day, we don't need to remember it here.

tjayrush avatar Nov 18 '23 01:11 tjayrush