pixi
Manage and run Python-based projects
TLDR
Initialize a new project
Add project dependencies
Start a pixi shell in the project environment
Run a task in the project environment
Manage tasks in the project environment
Display help
Clean environment and task cache
SYNOPSIS
pixi command [options] [arguments]
PARAMETERS
--verbose
Increases verbosity of the output. Can be specified multiple times for more detail.
--quiet
Suppresses normal output, showing only errors.
--color WHEN
Controls when to use colored output. WHEN can be `auto`, `always`, or `never`.
--frozen
Ensures that the lockfile (`pixi.lock`) is not modified. An error occurs if a modification is needed.
--locked
Ensures that the lockfile (`pixi.lock`) is up-to-date with the `pixi.toml`. An error occurs if it's out of sync.
--manifest-path PATH
Specifies the path to the `pixi.toml` manifest file. Defaults to the current directory.
--help
Displays help information for the command or subcommand.
DESCRIPTION
Pixi is a modern, cross-platform package manager developed by prefix.dev, designed to create fast and reproducible development environments. It aims to unify dependency management across different language ecosystems, primarily focusing on Rust and Python, but capable of managing other tools and dependencies. Unlike traditional package managers that often focus on a single language, pixi leverages concepts similar to `conda` to manage environments and dependencies for multiple languages within a single project. It prioritizes speed, caching, and deterministic builds, making it an excellent choice for collaborative and continuous integration workflows. Pixi uses a `pixi.toml` file to declare project dependencies, scripts, and environment configurations.
CAVEATS
Pixi is a relatively new tool compared to established package managers like `pip` or `conda`, and its ecosystem and feature set are still evolving. While powerful for polyglot projects, adoption requires integrating a new workflow. It's not typically pre-installed on Linux systems, requiring manual installation. Its dependency resolution relies on a `conda`-like solver, which might behave differently than pure `pip` or `cargo` resolvers.
KEY SUBCOMMANDS
pixi operates primarily through subcommands:
install: Installs project dependencies defined in `pixi.toml` and creates the environment.
run: Executes scripts or commands defined in `pixi.toml` within the project's environment.
add: Adds new dependencies to the project, updating `pixi.toml` and `pixi.lock`.
shell: Enters a shell with the project's environment activated.
update: Updates project dependencies to their latest compatible versions.
remove: Removes dependencies from the project.
INSTALLATION
Pixi can be installed on Linux (and other OSes) typically via a one-liner script provided by prefix.dev or by downloading pre-built binaries. For example, using `curl | bash` or through a package manager like `brew` on macOS. It's often installed into a user's local binary path, requiring it to be added to the `PATH` environment variable for direct execution.
HISTORY
Developed by prefix.dev, pixi emerged from the need for a more robust and unified package management solution for polyglot development environments, particularly in scientific computing and data science where Python and Rust often coexist. Its development began in the early 2020s, drawing inspiration from existing tools while aiming to improve reproducibility, speed, and cross-platform consistency. It has gained traction among developers seeking deterministic builds and simplified environment setup.