Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Accept CLI args via config file #1041

Open
axic opened this issue Mar 24, 2016 · 6 comments
Open

Accept CLI args via config file #1041

axic opened this issue Mar 24, 2016 · 6 comments

Comments

@axic
Copy link
Contributor

axic commented Mar 24, 2016

Splitting off from trufflesuite/ganache-cli-archive#24.

As suggested in https://github.com/ethereumjs/testrpc/issues/23 parsing a genesis.json would be a useful feature and in #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 (trufflesuite/ganache-cli-archive#28 (gasLimit) and trufflesuite/ganache-cli-archive#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
Copy link
Contributor

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

Agreed.

@tcoulter
Copy link
Contributor

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
Copy link
Contributor Author

axic commented Mar 24, 2016

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:

  • have at least a or b defined;
  • or if c is set d must be provided also

@daithi-coombes
Copy link

+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: trufflesuite/ganache-cli-archive@master...daithi-coombes:configuration-file

@benjamincburns
Copy link
Contributor

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.

@davidmurdoch davidmurdoch transferred this issue from trufflesuite/ganache-cli-archive Aug 19, 2021
@cds-amal
Copy link
Member

cds-amal commented Nov 3, 2021

This will be addressed in #811

@davidmurdoch davidmurdoch self-assigned this Apr 22, 2022
@davidmurdoch davidmurdoch changed the title Configuration file discussion Accept CLI args via config file Apr 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Stalled
Development

No branches or pull requests

6 participants