Closed 3alpha closed 3 months ago
If we support specifying CLI params via env vars, as proposed in #482, this issue might not require a lot (or any) work. The user could simply source
the env file (file with env vars), or specify the path to the env file, perhaps via a dedicated env var.
E.g. assuming the user has an env file at ./env_vars
:
export ACCOUNTS=3
export SEED=42
One of the following could be supported:
source
Relying on source
wouldn't require doing any work to close this issue.
source ./env_vars && starknet-devnet
Alternatively, run in a subshell to prevent keeping the env vars set:
( source ./env_vars && starknet-devnet )
Using a DEVNET_ENV
env var would be simpler for the user, but would require adding some code logic, just as would adding an --env-file
CLI parameter.
DEVNET_ENV=./env_vars starknet-devnet
Passing complicated configuration settings using CLI flags can become impractical, and since there is already
/config
endpoint that dumps configuration into JSON, it only would only make sense to have CLI flag that can read file of that format to spin up devnet instance with same configuration.