Skip to content

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.nim declares a development environment, in a devEnv: block.

Start a shell in the environment

From anywhere inside the project, run:

repro shell

You 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 --version

repro 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 test

Arguments after -- go to the task's command:

repro run test -- --verbose

Choose 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=docs

Without --activity, reprobuild uses the activity named default.

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.