Skip to main content
The pixi global expose command manages which executables from global environments are exposed (made available) in your system PATH.

Usage

Subcommands

  • add - Add exposed binaries from an environment
  • remove - Remove exposed binaries from the global environment

expose add

Add exposed binaries from a global environment to your system PATH.

Usage

Arguments

string
required
Mapping that describes which executables are exposed.Format:
  • exposed_name=executable_name - Expose executable with custom name
  • executable_name - Expose executable with same name (shorthand for executable_name=executable_name)
Multiple mappings can be specified.

Options

string
required
The environment from which binaries should be exposed.Short flag: -e

Examples

Expose with Custom Name

Exposes the python executable as both python3.11 and python3.

Expose with Default Name

Exposes ruff, black, and mypy using their default executable names.

Expose Single Executable

Or simply:

Multiple Custom Mappings

Exposes multiple executables with different names.

expose remove

Remove exposed binaries from the global environment.

Usage

Arguments

string
required
The exposed name(s) that should be removed. Multiple names can be specified.This is the name you use to call the executable (e.g., python3.11), not the original executable name.
The command automatically determines which environment contains each exposed name.

Examples

Remove Single Exposure

Removes the python3.11 exposed executable.

Remove Multiple Exposures

Removes multiple exposed executables at once.

Remove All Python Exposures

Removes all Python-related exposed executables.

How Exposure Works

Unix/macOS

Exposed executables are symlinked to ~/.pixi/bin/:
Ensure ~/.pixi/bin is in your PATH:

Windows

Exposed executables are made available through shims in %USERPROFILE%\.pixi\bin\.

Complete Examples

Set Up Python Environment with Multiple Exposures

Manage Tool Exposures

Resolve Naming Conflicts

Change Exposure After Installation

State Changes Reported

After successful expose operations:

Add Output

Remove Output

Troubleshooting

Executable Not Found in Environment

Error: executable 'xyz' not found in environment 'myenv' Solution: Verify the executable exists:

Exposed Name Already Exists

Error: exposed name 'python' already exists Solution: Remove the existing exposure first:

Environment Not Found

Error: Environment 'xyz' not found Solution: Check environment name:

Exposed Binary Not in PATH

After exposing, executable not found: Solution: Ensure ~/.pixi/bin is in your PATH:

Exposure Removed but Binary Still Works

Binary might be exposed from another environment or installed separately:

Error Handling

If an expose operation fails, pixi automatically reverts changes to maintain consistency.
On error:
  1. Changes to the environment are rolled back
  2. Symlinks/shims are restored to previous state
  3. Error details are reported

Config Options

boolean
Disable TLS certificate verification.
string
Path to authentication file.

Best Practices

Use Version-Specific Names

This prevents conflicts when multiple versions are installed.

Document Custom Mappings

Keep track of custom exposures:

Remove Unused Exposures

Clean up exposures you no longer need:

See Also