pixi global add command adds dependencies to an existing global environment and updates the global manifest.
Usage
Arguments
Package specification to add to the global environment. Can be:
- Package name:
python - Version constraint:
python=3.11.* - MatchSpec:
python>=3.11,<3.12
Options
Environment Selection
Specifies the environment that dependencies should be added to.Short flag:
-eThe environment must already exist. Use pixi global install to create new environments.Expose Executables
Add one or more mappings describing which executables are exposed.Format:
exposed_name=executable_name or just executable_name (which becomes executable_name=executable_name).Can be specified multiple times.Behavior
Adding Dependencies
When you add dependencies to a global environment:- Dependencies are added to the global manifest
- The environment is synced (packages are installed)
- Executables are exposed based on
--exposeflags - Completions are updated (on Unix systems)
Package Installation
The command installs or upgrades packages:- New packages: Installed with their dependencies
- Existing packages: Upgraded to meet the new specification
- Dependencies: Automatically resolved and installed
Executable Exposure
Exposed executables are made available system-wide:- On Unix: Symlinked to
~/.pixi/bin/ - On Windows: Added to PATH through shims
Examples
Add Single Package
Add Multiple Packages
Add with Version Constraint
Add and Expose Executables
python3.11 and python3.
Add with Simple Exposure
Add Multiple Packages with Exposure
Common Use Cases
Add Tools to Existing Environment
Upgrade Package Version
Add Package with Multiple Exposed Names
Error Handling
Environment Doesn’t Exist
Error:Environment xyz doesn't exist
Solution: Create the environment first:
Package Not Found
Error:package 'numpyy' not found
Solution: Check package name:
Version Conflict
Error:cannot satisfy version constraint
Solution: Adjust version constraints or check compatibility:
Reversion on Error
If the add operation fails, pixi automatically reverts the environment to its previous state.
State Changes Reported
After a successful add, pixi reports:- Packages added with versions
- Executables exposed
- Completions updated
Comparison with Related Commands
global add vs global install
pixi global install: Creates a new environment or reinstalls existing onepixi global add: Adds dependencies to an existing environment
global add vs add
pixi add: Adds dependencies to workspace projectpixi global add: Adds dependencies to global environment (user-level)
Global Manifest Location
The global manifest is stored at:- Unix:
~/.pixi/manifests/pixi-global.toml - Windows:
%USERPROFILE%\.pixi\manifests\pixi-global.toml
Config Options
Disable TLS certificate verification.
Path to authentication file.
See Also
- pixi global install - Install a new global environment
- pixi global remove - Remove dependencies from environment
- pixi global expose - Manage exposed executables
- pixi global list - List global environments