Enter a project's environment
This page shows how to use the tools and variables a project declares for working on it: in a shell, for one command, or exported to another tool.
Before you start
- Install reprobuild.
- The project's
repro.nimdeclares a development environment, in adevEnv:block.
Start a shell in the environment
From anywhere inside the project, run:
repro shellYou are in a new shell with the project's tools on PATH and its variables set. Leave it with exit.
Run one command in the environment
Put the command after --:
repro exec -- cargo --versionrepro exec runs the command and returns its exit status, without starting an interactive shell. Use it in scripts and in CI.
Run one of the project's tasks
List the tasks the project declares, then run one by name:
repro tasks
repro run testArguments after -- go to the task's command:
repro run test -- --verboseChoose an activity
A project can declare several activities, each switching on a different set of tools and services. Name the one you want:
repro shell --activity=docsWithout --activity, reprobuild uses the activity named default.
Print the environment instead of entering it
To hand the environment to an editor, a CI step or another shell, print it:
repro shell --print-env=posix--print-env also takes fish, powershell and json.