Crates.io | ldenv |
lib.rs | ldenv |
version | 0.3.0 |
source | src |
created_at | 2023-03-28 19:02:28.255079 |
updated_at | 2023-05-10 09:42:42.792578 |
description | program that load multiple env files based on mode and execute a command. |
homepage | https://github.com/wighawag/ldenv#readme |
repository | https://github.com/wighawag/ldenv |
max_upload_size | |
id | 823349 |
size | 24,642 |
Uses dotenvy but uses mode files
By default the mode is local and it will load in order
and so .env.local has priority
By default if no mode is provided on the command line, it will get the mode from the environment variable MODE
you can specify a different env variable to get the default mode via -a /sy -n <env variable name>
And you can specify the mode directly via -m <mode>
for example with with ldenv -m production env
it will load the following in order
and execute the command env
[preffix]@@<env names>[@:<default value>][@:<suffix>]
Examples for the parse:
target/debug/ldenv echo @@RPC_URL_:MODE:,RPC_URL@:http://localhost:8545@: @@ localhost
This will load localhost as MODE and will try to fetch RPC_URL_<MODE>
as env variable, falling bacon RPC_URL
or default to http://localhost:8545