pixi run will automatically update the lockfile and install the environment if required.
Usage
pixi r
Arguments
The pixi task or shell command you want to run in the workspace’s environment. Can be an executable in the environment’s PATH.If no task is specified, pixi will print all available tasks.
Options
The path to the
pixi.toml or pyproject.toml file.Install the environment as defined in the lockfile, without updating it.
Check if the lockfile is up-to-date before installing the environment. Errors if the lockfile is out-of-date.
The environment to run the task in.
Execute the command as an executable without resolving Pixi tasks.Useful when a task name and an executable have the same name.
Use a clean environment to run the task.This flag will ignore your current shell environment and use a bare minimum environment to activate the pixi environment in.
Don’t run the dependencies of the task (tasks defined in the
depends-on field).Enable template rendering for the command arguments.By default, arguments passed to
pixi run on the command line are not processed by the template engine. Use this flag to enable rendering of template variables like {{ pixi.platform }}.Run the task in dry-run mode (only print the command that would run).
Don’t install the environment, only activate it.
Examples
Run a task
Run a task with arguments
Run a command directly
List all available tasks
When no task is provided, pixi will display all tasks available in the current environment.
Run an executable by name when a task exists with the same name
Run a task in a specific environment
Run a task with a clean environment
Skip task dependencies
Dry-run mode
Task Execution
When you run a task:- Pixi checks if the lockfile is up-to-date (unless
--frozenis used) - Installs the environment if needed (unless
--no-installis used) - Activates the environment
- Executes the task and any dependencies (unless
--skip-depsis used) - Returns the exit code of the task
Task Dependencies
Tasks can depend on other tasks using thedepends-on field. By default, pixi will run all dependencies before the main task. Use --skip-deps to skip this behavior.
Environment Variables
Tasks run in an activated pixi environment with all environment variables set. Use--clean-env to start with a minimal environment.
Template Variables
By default, template variables in command-line arguments are not rendered. Enable this with--templated: