jnc exec
Runs a command in a temporary, isolated environment. The required packages are automatically installed into a cached environment and the command is executed within it. This is useful for one-off commands without creating a full workspace. Temporary environments are cached for reuse. Clear them withjnc clean cache --exec.
Usage
x
Arguments
| Argument | Description |
|---|---|
<COMMAND> [ARGS]... | The executable to run, followed by any arguments. If --spec is not provided, the package is guessed from the command name. |
Options
| Option | Short | Description |
|---|---|---|
--spec <SPEC> | -s | Matchspecs of packages to install. Can be specified multiple times. When provided, disables automatic package guessing. |
--with <SPEC> | -w | Additional matchspecs to install alongside the guessed package. Cannot be combined with --spec. |
--channel <CHANNEL> | -c | The channel to search for packages. Can be specified multiple times. Defaults to conda-forge. |
--platform <PLATFORM> | -p | The platform to create the environment for. Defaults to the current platform. |
--force-reinstall | Always create a new environment, even if a cached one exists. | |
--list[=REGEX] | List packages in the environment before executing the command. Optionally filter by regex. | |
--no-modify-ps1 | Disable modification of the PS1 prompt to indicate the temporary environment. |