Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

run

Run a command inside a virtualenv without activating it in the parent shell — useful for CI, one-shot scripts, and editor integrations.

Usage

scuv run <env> [--] <command> [args...]

The -- separator is optional but recommended when <command> accepts flags that might collide with scuv’s own flags.

Arguments

ArgumentRequiredDescription
envYesName of the virtualenv
commandYesProgram (and arguments) to execute

Environment Wiring

The spawned child sees the same vars that scuv activate would set:

VariableValue
VIRTUAL_ENVAbsolute path of the env
SCUV_ACTIVE<env>
PATHEnv’s bin/ prepended to inherited PATH
PYTHONHOMERemoved

A bare program name (no / or \) is looked up inside the env’s bin/ first — so scuv run env -- python always picks the env’s interpreter, not a system one. An explicit path (/usr/bin/python3) is used verbatim.

Exit Codes

scuv run exits with the child’s exit code. On Unix, a child killed by a signal exits as 128 + signum (matching what bash exposes via $?).

Examples

scuv run myenv -- python script.py
scuv run myenv -- uv pip install requests
scuv run myenv -- pytest -vv tests/
scuv run myenv -- which python   # absolute path inside myenv