Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

pixi-package-manager

БесплатноБез исполняемых скриптовНе проверен

Use when the user works with pixi (pixi.toml, pixi.lock, pixi add/run/task/global/exec) or wants a reproducible scientific Python environment that mixes…

uw-ssecот uw-ssec★ 33 звезды на GitHub

Об этом скилле

Pixi Package Manager for Scientific Python

pixi is a package manager that unifies the conda and PyPI ecosystems for reproducible scientific Python development. Use it to manage scientific dependencies, create isolated environments, and build reproducible workflows via pyproject.toml integration.

Official Documentation: https://pixi.sh GitHub: https://github.com/prefix-dev/pixi

Quick Reference Card

Installation & Setup

# Install pixi (macOS/Linux)
curl -fsSL https://pixi.sh/install.sh | bash

# Install pixi (Windows)
irm -useb https://pixi.sh/install.ps1 | iex

# Initialize new project with pyproject.toml
pixi init --format pyproject

# Import from an existing environment.yml (writes pixi.toml; --import and --format can't be combined)
pixi init --import environment.yml

Essential Commands

# Add dependencies
pixi add numpy scipy pandas              # conda packages
pixi add --pypi pytest-cov               # PyPI-only packages
pixi add --feature dev pytest ruff       # dev environment

# Install all dependencies
pixi install

# Run commands in environment
pixi run python script.py
pixi run pytest

# Shell with environment activated
pixi shell

# Add tasks
pixi task add test "pytest tests/"
pixi task add docs "sphinx-build docs/ docs/_build"

# Run tasks
pixi run test
pixi run docs

# Update dependencies
pixi update numpy                         # update specific
pixi update                              # update all

# List packages
pixi list
pixi tree numpy                          # show dependency tree

# Global tools (replaces pipx / condax for CLI utilities)
pixi global install ruff                  # install a CLI tool globally
pixi global list                          # list globally installed tools

# Run a tool in a temporary throwaway environment (no project needed)
pixi exec ruff check .                    # run ruff without installing it
pixi exec --spec python=3.12 python -V    # one-off env with a pinned spec

# Print activation for use in scripts / CI without a subshell
pixi shell-hook                           # emit activation commands

Core Concepts

Pixi uses the [tool.pixi.workspace] table (formerly project; still a deprecated alias). For pixi.toml vs pyproject.toml, pyproject integration, and pixi-vs-uv guidance, see references/manifest-and-tooling.md.

1. Unified Package Management (conda + PyPI)

Conda-forge and PyPI packages resolve in one graph. In a pyproject.toml manifest, [project].dependencies are PyPI requirements; conda-forge packages go in [tool.pixi.dependencies]. If a package appears in both, pixi installs the conda version.

[project]
name = "my-science-project"
requires-python = ">=3.11"
dependencies = [
    "my-custom-pkg>=1.0",   # PyPI (also what `pip install .` sees)
]

[tool.pixi.dependencies]
numpy = ">=1.24"            # conda-forge (optimized builds)
pandas = ">=2.0"            # conda-forge

pixi add numpy writes to [tool.pixi.dependencies]; pixi add --pypi pkg writes to [project].dependencies.

2. Multi-Platform Lockfiles

Commit pixi.lock so collaborators and CI resolve identical versions. The lockfile only covers the platforms listed in the workspace, which default to the current machine's platform, so list every platform you support:

[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["linux-64", "osx-arm64", "osx-64", "win-64"]

Regenerate the lockfile without installing with pixi lock.

3. Feature-Based Environments

Compose environments from features without duplicating dependencies:

[tool.pixi.feature.test.dependencies]
pytest = ">=7.0"
pytest-cov = ">=4.0"

[tool.pixi.feature.gpu.system-requirements]
cuda = "12"                 # lets the solver pick CUDA builds

[tool.pixi.feature.gpu.dependencies]
pytorch-gpu = "*"           # conda-forge CUDA build of pytorch

[tool.pixi.environments]
test = ["test"]
gpu = ["gpu"]
gpu-test = ["gpu", "test"]  # combines features

pixi add --feature dev ... only records dependencies on the feature. Nothing can use them until an environment lists the feature, for example dev = ["dev"] under [tool.pixi.environments]; then run pixi run -e dev ....

4. Task Automation

Define reusable commands as tasks:

[tool.pixi.tasks]
test = "pytest tests/ -v"
format = "ruff format src/ tests/"
lint = "ruff check src/ tests/"
docs = "sphinx-build docs/ docs/_build"
analyse = { cmd = "python scripts/analyze.py", depends-on = ["test"] }

5. Global Tools and One-Off Execution

Not every tool belongs in a project environment — install persistent CLI tools, run throwaway one-offs, or emit a subshell-free activation script for CI using the global / exec / shell-hook commands in the Quick Reference Card above.

Quick Start

Minimal Example: Data Analysis Project

# Create new project
mkdir climate-analysis && cd clim
Полный SKILL.md на GitHub

Установить pixi-package-manager в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

assets/github-actions-pixi.ymlassets/pyproject-multi-env.tomlassets/pyproject-pixi-example.tomlreferences/best-practices.mdreferences/common-issues.mdreferences/manifest-and-tooling.mdreferences/patterns.md

FAQ

Что делает скилл pixi-package-manager?

Use when the user works with pixi (pixi.toml, pixi.lock, pixi add/run/task/global/exec) or wants a reproducible scientific Python environment that mixes conda-forge and PyPI packages: creating environments, adding dependencies, defining tasks, multi-platform lockfiles, or migrating from conda environment.yml / requirements.txt. Not for pure uv/pip projects or for building and publishing packages to PyPI (use python-packaging).

Как установить скилл pixi-package-manager?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл pixi-package-manager запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить pixi-package-manager с