trufflesuite / ganache

:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
https://consensys.io/blog/consensys-announces-the-sunset-of-truffle-and-ganache-and-new-hardhat?utm_source=github&utm_medium=referral&utm_campaign=2023_Sep_truffle-sunset-2023_announcement_
MIT License
2.62k stars 679 forks source link

Accept CLI args via config file #1041

Open axic opened 8 years ago

axic commented 8 years ago

Splitting off from https://github.com/ethereumjs/testrpc/pull/24.

As suggested in https://github.com/ethereumjs/testrpc/issues/23 parsing a genesis.json would be a useful feature and in trufflesuite/ganache-cli#24 we discussed perhaps it is better to have a separate configuration file and/or commandline parameters (for a subset or all options).

Given there are two other PRs in the pipeline (https://github.com/ethereumjs/testrpc/pull/28 (gasLimit) and https://github.com/ethereumjs/testrpc/pull/36 (gasPrice)) as well as the --seed and perhaps lightwallet options, I think it would be useful to discuss and make a decision on how configuration should work.

I would vote for having a comprehensive configuration file and including some frequently used options in the commandline.

tcoulter commented 8 years ago

I would vote myself for having a comprehensive configuration file and including some frequently used options in the commandline.

Agreed.

tcoulter commented 8 years ago

More esoteric things could go in the config file, though I'd like to include as many command line options as possible - I hate having to create a configuration file for one off configurations because the command line option isn't available. Would be nice to have good usage output as well (we should use yargs).

axic commented 8 years ago

helpeth uses yargs, it is nice, but it can get quite complex. Couldn't figure out some things so resorted to manually checking it after.

Complex conditions are painful:

daithi-coombes commented 7 years ago

+1 for having a configuration file...

created a concept branch for one - takes config from cmd line and merges it over options in bin/testrpc: https://github.com/ethereumjs/testrpc/compare/master...daithi-coombes:configuration-file

benjamincburns commented 7 years ago

Would accept a PR for this if it were effectively generating the config file parsing from the command line arg spec, and allowed command line args to override options specified in the config file. Not likely to prioritize this feature in the near future, however.

cds-amal commented 2 years ago

This will be addressed in #811