Loading...
Loading...
Comprehensive package and environment management using pixi - a fast, modern, cross-platform package manager. Use when working with pixi projects for (1) Project initialization and configuration, (2) Package management (adding, removing, updating conda/PyPI packages), (3) Environment management (creating, activating, managing multiple environments), (4) Feature management (defining and composing feature sets), (5) Task execution and management, (6) Global tool installation, (7) Dependency resolution and lock file management, or any other pixi-related operations. Supports Python, C++, R, Rust, Node.js and other languages via conda-forge ecosystem.
npx skill4agent add tttpob/bioinfo-skills pixibash scripts/check_pixi.shpixi init my-project
cd my-project
pixi add python numpy pandaspixi add <package> # Conda package
pixi add --pypi <package> # PyPI package
pixi add --feature dev pytest # Add to specific featurepixi run <task> # Run defined task
pixi exec <command> # Execute command in environment
pixi shell # Activate environment shellpixi shell --environment <name> # Activate specific environment
pixi run -e <name> <task> # Run task in environment# Standard pixi.toml format
pixi init my-project
# Use pyproject.toml format
pixi init --format pyproject my-projectpixi.tomlpyproject.toml# Add packages
pixi add numpy pandas matplotlib
pixi add "python>=3.11,<3.12"
pixi add --pypi requests flask
# Add to specific feature
pixi add --feature dev pytest black ruff
# Remove packages
pixi remove numpy
pixi remove --feature dev pytest
# Update packages
pixi update # Update all
pixi update numpy # Update specific package
pixi upgrade # Upgrade in manifest--pypi--host--build[dependencies]
python = "3.11.*"
numpy = "*"
[feature.test.dependencies]
pytest = "*"
pytest-cov = "*"
[feature.dev.dependencies]
black = "*"
ruff = "*"
[environments]
test = ["test"] # Includes: default + test
dev = ["dev", "test"] # Includes: default + dev + test# Activate environment
pixi shell --environment test
# Run task in environment
pixi run --environment test pytest
# Install specific environment
pixi install --environment dev
# List packages in environment
pixi list --environment test[feature.dev.dependencies]
pytest = "*"
black = "*"
ruff = "*"
mypy = "*"
[feature.dev.tasks]
test = "pytest tests/"
format = "black ."
lint = "ruff check ."[feature.py310.dependencies]
python = "3.10.*"
[feature.py311.dependencies]
python = "3.11.*"
[environments]
py310 = ["py310"]
py311 = ["py311"][feature.cuda.dependencies]
pytorch-cuda = { version = "*", channel = "pytorch" }
[feature.cpu.dependencies]
pytorch-cpu = { version = "*", channel = "pytorch" }
[environments]
cuda = ["cuda"]
cpu = ["cpu"]# Add tasks
pixi task add test "pytest tests/"
pixi task add format "black ."
pixi task add lint "ruff check ."
# Run tasks
pixi run test
pixi run format
# List tasks
pixi task list[tasks]
start = "python app.py"
test = "pytest tests/"
format = "black ."
# Task with dependencies
build = { cmd = "python setup.py build", depends-on = ["install"] }
# Feature-specific tasks
[feature.dev.tasks]
dev = "python app.py --reload"# Run command in activated environment
pixi exec python script.py
pixi exec pytest tests/
# Temporary package installation and execution
pixi exec --spec ruff ruff check .
pixi exec --spec black black .
# Run in specific environment
pixi exec --environment test pytest# Install global tools
pixi global install gh ripgrep fd-find bat
pixi global install ruff black mypy
# List global tools
pixi global list
# Upgrade tools
pixi global upgrade ruff
pixi global upgrade-all
# Remove tools
pixi global remove bat# Show project info
pixi info
# Detailed information
pixi info --extended
# JSON output
pixi info --json
# Use helper script
python scripts/pixi_info.pypixi.lock# Update lock file without installing
pixi lock
# Update lock for specific environment
pixi lock --environment test
# Install from lock file
pixi install --frozen# Remove environment directory
pixi clean
# Clean package cache
pixi clean cache
# Reinstall environment from scratch
pixi reinstallpixi initpixi addpixi addpixi add --pypi--featurepixi runpixi execpixi shellpixi updatepixi upgradepixi lockpixi global installpixi infopython scripts/pixi_info.pypixi init data-project
pixi add python numpy pandas matplotlib jupyter scikit-learn
pixi add --feature dev pytest black
pixi task add notebook "jupyter lab"
pixi run notebookpixi init web-app
pixi add python
pixi add --pypi fastapi uvicorn sqlalchemy
pixi add --feature dev --pypi pytest httpx
pixi task add dev "uvicorn app:app --reload"
pixi run dev[feature.py310.dependencies]
python = "3.10.*"
[feature.py311.dependencies]
python = "3.11.*"
[environments]
py310 = ["py310"]
py311 = ["py311"]pixi run -e py310 pytest
pixi run -e py311 pytestscripts/check_pixi.shscripts/pixi_info.pyreferences/cli-reference.mdreferences/features-guide.mdreferences/examples.mdassets/pixi.toml.template