Skip to content

Basic usage of Pixi#

Pixi can do alot of things, but it is designed to be simple to use. Let's go through the basic usage of Pixi.

Managing workspaces or projects#

  • pixi init - create a new Pixi manifest in the current directory
  • pixi add - add a dependency to your manifest
  • pixi remove - remove a dependency from your manifest
  • pixi update - update dependencies in your manifest
  • pixi upgrade - upgrade the dependencies in your manifest to the latest versions, even if you pinned them to a specific version
  • pixi lock - create or update the lockfile for your manifest
  • pixi info - show information about your workspace
  • pixi run - run a task defined in your manifest or any command in the current environment
  • pixi shell - start a shell in the current environment
  • pixi list - list all dependencies in the current environment
  • pixi tree - show a tree of dependencies in the current environment
  • pixi clean - remove the environment from your machine

Managing global installations#

Pixi can manage global installations of tools and environments. It installs the environments in a central location, so you can use them from anywhere.

More information: Global Tools

Running one-off commands#

Pixi can run one-off commands in a specific environment.

  • pixi exec - run a command in a temporary environment.
  • pixi exec --spec - run a command in a temporary environment, with a specific specification.

For example:

> pixi exec python -VV
Python 3.13.5 | packaged by conda-forge | (main, Jun 16 2025, 08:24:05) [Clang 18.1.8 ]
> pixi exec --spec "python=3.12" python -VV
Python 3.12.11 | packaged by conda-forge | (main, Jun  4 2025, 14:38:53) [Clang 18.1.8 ]

Multiple environments#

Pixi workspaces allow you to manage multiple environments. An environment is build out of one or multiple features.

More information: Multiple environments

Tasks#

Pixi can run cross-platform tasks using it's built-in task runner. This can be a predefined task or any normal executable.

Tasks can have other tasks as dependencies. Here is an example of a more complex task usecase

pixi.toml
[tasks]
build = "make build"
# using the toml table view
[tasks.test]
cmd = "pytest"
depends-on = ["build"]
More information: Tasks

Multi platform support#

Pixi supports multiple platforms out of the box. You can specify which platforms your workspace supports and Pixi will ensure that the dependencies are compatible with those platforms.

More information: Multi platform support

Utilities#

Pixi comes with a set of utilities to help you debug or manage your setup.

  • pixi info - Show information about the current workspace, and the global setup.
  • pixi config - Show or edit the Pixi configuration.
  • pixi tree - Show a tree of dependencies in the current environment.
  • pixi list - List all dependencies in the current environment.
  • pixi clean - Remove the project environments from your machine.
  • pixi help - Show help for Pixi commands.
  • pixi help <subcommand> - Show help for a specific Pixi command.
  • pixi auth - Manage authentication for conda channels.
  • pixi search - Search for packages in the configured channels.
  • pixi completion - Generate shell completion scripts for Pixi commands.

Going further#

There is still much more that Pixi has to offer. Check out the topics on the sidebar on the left to learn more.

And don't forget to join our Discord to join our community of Pixi enthusiasts!