The Project-Env Shell integration application allows to use tools setup by the Project-Env CLI in a shell environment. See Project-Env for more details.
brew install --cask project-env/tap/project-env-shell
winget install ProjectEnv.ProjectEnvShell
To use Project-Env managed tools in your unix shell, create the following script:
#!/bin/sh
if [[ ! -f "project-env.toml" ]]; then
sh
else
project-env-shell --config-file="project-env.toml" --output-template=sh --output-file=.project-env
source .project-env
sh
fi
To use the tools, you now only need to call the script to setup the shell.
For example, if you want to start your IntelliJ Terminal with Project-Env tools setup, configure the following command in the Terminal settings:
/bin/sh --login -c <path to script>
To use Project-Env managed tools in your Cygwin shell, create the following script:
@echo off
if not exist project-env.toml (
bash.exe
) else (
project-env-shell.exe --config-file=project-env.toml --output-template=cygwin --output-file=.project-env
dos2unix .project-env
bash.exe --init-file .project-env
)
To use the tools, you now only need to call the script to setup the shell.