Advanced configuration¶
This guide describes advanced configuration methods.
Environment variables and .env files¶
Some CLI options, such as --layout, can be configured via environment variables.
This will be indicated in the usage message when running nipoppy <SUBCOMMAND> --help.
It is also possible to set these options using .env environment files.
By default, Nipoppy searches the following locations (in order of decreasing priority):
<NIPOPPY_PROJECT_ROOT>/.env: project-level~/.nipoppy/.env: user-level/etc/nipoppy/.env: system-level
The search paths can be overridden by setting the NIPOPPY_ENV_PATHS environment variable with paths separated by the platform path separator
(e.g., export NIPOPPY_ENV_PATHS="[[NIPOPPY_DPATH_ROOT]]/.env:~/.nipoppy/.env:/etc/nipoppy/.env" for the default paths).
Only the [[NIPOPPY_DPATH_ROOT]] substitution is allowed here.
The overall order for determining the value of options is as follows (highest to lowest priority):
Command-line options that are explicitly passed when calling the command
Environment variables that are already defined at runtime
Environment variables loaded from
.envfile(s) (see above)CLI default values