pixi shell-hook#
About#
Print the pixi environment activation script
Usage#
Options#
- 
--shell (-s) <SHELL>- Sets the shell, options: [
bash,zsh,xonsh,cmd,powershell,fish,nushell] 
 - 
--environment (-e) <ENVIRONMENT>- The environment to activate in the script
 
 - 
--json- Emit the environment variables set by running the activation as JSON
default:false 
 
Config Options#
- 
--auth-file <AUTH_FILE>- Path to the file containing the authentication token
 
 - 
--concurrent-downloads <CONCURRENT_DOWNLOADS>- Max concurrent network requests, default is 
50 
 - 
--concurrent-solves <CONCURRENT_SOLVES>- Max concurrent solves, default is the number of CPUs
 
 - 
--pinning-strategy <PINNING_STRATEGY>- Set pinning strategy
options:semver,minor,major,latest-up,exact-version,no-pin 
 - 
--pypi-keyring-provider <PYPI_KEYRING_PROVIDER>- Specifies whether to use the keyring to look up credentials for PyPI
options:disabled,subprocess 
 - 
--run-post-link-scripts- Run post-link scripts (insecure)
 
 - 
--tls-no-verify- Do not verify the TLS certificate of the server
 
 - 
--use-environment-activation-cache- Use environment activation cache (experimental)
 
 - 
--force-activate- Do not use the environment activation cache. (default: true except in experimental mode)
 
 - 
--no-completions- Do not source the autocompletion scripts from the environment
 
 - 
--change-ps1 <CHANGE_PS1>- Do not change the PS1 variable when starting a prompt
options:true,false 
 
Update Options#
- 
--no-install- Don't modify the environment, only modify the lock-file
 
 - 
--frozen=<FROZEN>- Install the environment as defined in the lockfile, doesn't update lockfile if it isn't up-to-date with the manifest file
env:PIXI_FROZEN
default:false
options:true,false 
 - 
--locked=<LOCKED>- Check if lockfile is up-to-date before installing the environment, aborts when lockfile isn't up-to-date with the manifest file
env:PIXI_LOCKED
default:false
options:true,false 
 - 
--as-is- Shorthand for the combination of --no-install and --frozen
 
 
Global Options#
- 
--manifest-path <MANIFEST_PATH>- The path to 
pixi.toml,pyproject.toml, or the workspace directory 
 
Description#
Print the pixi environment activation script.
You can source the script to activate the environment without needing pixi itself.
Examples#
pixi shell-hook
pixi shell-hook --shell bash
pixi shell-hook --shell zsh
pixi shell-hook -s powershell
pixi shell-hook --manifest-path ~/myworkspace/pixi.toml
pixi shell-hook --frozen
pixi shell-hook --locked
pixi shell-hook --environment cuda
pixi shell-hook --json
Example use-case, when you want to get rid of the pixi executable in a Docker container.