You can use ERL_FLAGS
environment variable to specify sys.config
file to load at ERTS startup (before rebar3 starts).
Example sys.config content:
[{kernel, [
{key, value}
]}].
Example starting rebar3 shell with it:
max-au:~$ ERL_FLAGS="-config sys.config" rebar3 shell
===> Verifying dependencies...
Erlang/OTP 26 [DEVELOPMENT] [erts-13.1.4] [source-7bc70bd590] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]
Eshell V13.1.4 (press Ctrl+G to abort, type help(). for help)
1> application:get_env(kernel, key).
{ok,value}
2>