Skip to main content

jnc run

Runs a task or shell command inside the activated workspace environment. The command can be a predefined task from the manifest or an arbitrary executable found in the environment’s PATH. The environment is automatically installed and updated before execution if needed. Tasks defined in the manifest can depend on other tasks and will be executed in the correct topological order. If no task is provided, jnc run prints a list of all available tasks. Alias: r

Usage

jnc run [OPTIONS] [TASK]...

Arguments

ArgumentDescription
TASKThe task name(s) or shell command to run. Multiple tasks can be chained.

Options

OptionDescription
-e, --environment <ENV>The environment to run the task in.
-x, --executableExecute the command as a raw executable, bypassing task resolution. Useful when a task name and an executable share the same name.
--clean-envRun with a clean environment, ignoring variables from the current shell.
--skip-depsDo not run the task’s depends-on dependencies.
--templatedEnable template rendering for command arguments (e.g., {{ pixi.platform }}).
-n, --dry-runPrint the command that would be run without executing it.

Update Options

OptionDescription
--frozenUse the lockfile as-is, do not update it.
--lockedRequire the lockfile to be up-to-date, abort if not.
--no-installDo not install the environment before running.
--as-isShorthand for --frozen --no-install.

Global Options

OptionDescription
-m, --manifest-path <PATH>Path to pixi.toml, pyproject.toml, or the workspace directory.

Examples

Run a predefined task

jnc run test

Run an arbitrary command in the environment

jnc run python -c "print('Hello!')"

Run a task in a specific environment

jnc run --environment test pytest -v

Chain multiple tasks

jnc run build test lint

Run with a clean environment

jnc run --clean-env python my_script.py

Dry run to preview commands

jnc run --dry-run test

Run a raw executable (bypass task resolution)

jnc run --executable python --version

List all available tasks

jnc run