poetry-run
Execute commands in virtual environment
TLDR
Run command in virtual environment
SYNOPSIS
poetry run command [args]
DESCRIPTION
poetry run executes a command within the project's virtual environment without requiring manual activation. It automatically locates and uses the correct virtual environment for the current project.
This is the recommended way to run project scripts, test suites, and installed tools. For example, `poetry run pytest` runs tests using the project's dependencies, and `poetry run python script.py` executes a script with the project's Python interpreter. An alternative is poetry shell for an interactive session.
PARAMETERS
COMMAND
Command to execute.ARGS
Arguments to pass.
CAVEATS
Creates venv if not exists. Alternative to poetry shell.
HISTORY
poetry run provides virtual environment command execution.
SEE ALSO
poetry(1), poetry-shell(1)
