Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/prefix-dev/pixi/llms.txt

Use this file to discover all available pages before exploring further.

Pixi respects various environment variables that control its behavior. This page documents all environment variables recognized by pixi.

Global Behavior

PIXI_COLOR

PIXI_COLOR
enum
default:"auto"
Controls colored output in the terminal.Values:
  • auto - Automatically detect if colors are supported
  • always - Always use colors
  • never - Never use colors
export PIXI_COLOR=never
pixi install
Can also be set via --color flag.

PIXI_NO_PROGRESS

PIXI_NO_PROGRESS
boolean
default:"false"
Hide all progress bars. Always enabled if stderr is not a terminal.
export PIXI_NO_PROGRESS=true
pixi install
Can also be set via --no-progress flag.

PIXI_NO_WRAP

PIXI_NO_WRAP
boolean
default:"false"
Disable line wrapping in error messages. Useful in CI environments.
export PIXI_NO_WRAP=true

Lock File Behavior

PIXI_FROZEN

PIXI_FROZEN
boolean
default:"false"
Install the environment as defined in the lockfile without updating it.
export PIXI_FROZEN=true
pixi install  # Uses existing lock file
Can also be set via --frozen flag.

PIXI_LOCKED

PIXI_LOCKED
boolean
default:"false"
Check if lockfile is up-to-date before installing. Aborts if lockfile is outdated.
export PIXI_LOCKED=true
pixi install  # Fails if lock file is out of date
Can also be set via --locked flag.

Pixi Home Directory

PIXI_HOME

PIXI_HOME
path
Override the default pixi home directory where global installations and manifests are stored.Default locations:
  • Linux: ~/.pixi
  • macOS: ~/Library/Application Support/pixi
  • Windows: %USERPROFILE%\.pixi
export PIXI_HOME=/custom/pixi/home
pixi global install python

Cache and Storage

PIXI_CACHE_DIR

PIXI_CACHE_DIR
path
Override the default cache directory.Default locations:
  • Linux: ~/.cache/rattler
  • macOS: ~/Library/Caches/rattler
  • Windows: %LOCALAPPDATA%\rattler\Cache
export PIXI_CACHE_DIR=/mnt/cache/pixi

Authentication

RATTLER_AUTH_FILE

RATTLER_AUTH_FILE
path
Override the default location for authentication credentials.Default: ~/.rattler/credentials.json
export RATTLER_AUTH_FILE=/secure/location/credentials.json
pixi auth login https://prefix.dev

Network and Proxy

HTTP_PROXY / HTTPS_PROXY

HTTP_PROXY
url
HTTP/HTTPS proxy server to use for network requests.
export HTTP_PROXY=http://proxy.example.com:8080
export HTTPS_PROXY=http://proxy.example.com:8080
pixi install

NO_PROXY

NO_PROXY
string
Comma-separated list of hosts to exclude from proxying.
export NO_PROXY=localhost,127.0.0.1,.example.com

Conda and Rattler

CONDA_PREFIX

CONDA_PREFIX
path
Set by pixi when activating an environment. Points to the active environment directory.Read by pixi: This is set automatically by pixi and used by tools to detect the active environment.
# Inside a pixi environment
echo $CONDA_PREFIX
# /path/to/workspace/.pixi/envs/default

CONDA_DEFAULT_ENV

CONDA_DEFAULT_ENV
string
Name of the active conda environment. Set automatically by pixi.
# Inside a pixi environment
echo $CONDA_DEFAULT_ENV
# default

Pixi-Specific Runtime Variables

These variables are set by pixi when running tasks or activating environments.

PIXI_ENVIRONMENT_NAME

PIXI_ENVIRONMENT_NAME
string
Name of the currently active pixi environment. Set by pixi during pixi run and pixi shell.
pixi run bash
echo $PIXI_ENVIRONMENT_NAME
# default

PIXI_WORKSPACE_ROOT

PIXI_WORKSPACE_ROOT
path
Root directory of the pixi workspace. Set during task execution.
pixi run bash
echo $PIXI_WORKSPACE_ROOT
# /path/to/workspace

PIXI_WORKSPACE_MANIFEST

PIXI_WORKSPACE_MANIFEST
path
Path to the workspace manifest file (pixi.toml or pyproject.toml).

PIXI_WORKSPACE_VERSION

PIXI_WORKSPACE_VERSION
string
Version of the workspace from the manifest.

PIXI_WORKSPACE_NAME

PIXI_WORKSPACE_NAME
string
Name of the workspace from the manifest.

CI/CD Environment

CI

CI
boolean
Detected by pixi to adjust behavior in CI environments.Values: 1, true (case-insensitive)Effects:
  • Disables line wrapping in error messages
  • Adjusts progress bar behavior
export CI=true
pixi install

Editor Configuration

EDITOR

EDITOR
string
default:"nano (Unix) / notepad (Windows)"
Default editor for pixi config edit.
export EDITOR=vim
pixi config edit

Logging and Debugging

RUST_LOG

RUST_LOG
string
Control pixi’s internal logging level. Useful for debugging.Levels: error, warn, info, debug, trace
# Enable debug logging
export RUST_LOG=pixi=debug,rattler=debug
pixi install

# Trace everything
export RUST_LOG=trace
pixi install

RUST_BACKTRACE

RUST_BACKTRACE
enum
Show backtraces for errors.Values:
  • 0 - No backtrace
  • 1 - Short backtrace
  • full - Full backtrace
export RUST_BACKTRACE=1
pixi install

Build System

CARGO_TARGET_DIR

CARGO_TARGET_DIR
path
Override Rust build output directory. Can be set in pixi.toml activation.
[activation]
env.CARGO_TARGET_DIR = "target/pixi"

Shell Integration

_PIXI_PROMPT

_PIXI_PROMPT
string
Set by pixi shell on Windows to customize the command prompt.Format: (pixi:{environment_name}) $P$G

Example: CI Configuration

Typical CI environment variable setup:
#!/bin/bash
# CI setup for pixi

export CI=true
export PIXI_COLOR=never
export PIXI_NO_PROGRESS=true
export PIXI_FROZEN=true  # Don't update lock file in CI

# Install dependencies
pixi install

# Run tests
pixi run test

Example: Custom Cache Location

Use a shared cache location:
# Shared team cache
export PIXI_CACHE_DIR=/mnt/shared/pixi-cache
export RATTLER_AUTH_FILE=/mnt/shared/credentials.json

pixi install

Environment Variables in Tasks

You can use environment variables in your pixi tasks:
[tasks]
build = { cmd = "cargo build", env = { CARGO_TARGET_DIR = "target/custom" } }
test = "pytest -v $PYTEST_ARGS"

Build docs developers (and LLMs) love