Pixi tasks

Pixi tasks are named commands defined by a repository. They hide details such as the Quarto working directory, profile arguments, environment selection, or pre-render setup.

Inspect available tasks

The available tasks for a project/repository can be listed with the command

pixi task list

Producing something similar to

-----------------------------------
preview, render
Task     Description
preview  Preview the quarto site
render   Render the quarto site

More information about the available tasks can be found in the specific project documentation and the pixi.toml-file.

Run a task

Run a documented task with:

pixi run <task-name>

Some documentation uses the equivalent abbreviation pixi r <task-name>.

Frequent task roles

Role Typical task names Purpose
Local authoring preview Watch source changes and serve a local preview
Final build render, render-all Produce one or all rendered outputs
Cleanup clean Remove previously generated material before rebuilding
Setup github-auth, font or package fetch tasks Provide project-specific prerequisites
Validation figure, download, or script checks Detect broken referenced resources

Project specific tasks

Sometimes it’s useful to define a project specific task. These should be defined using tooling that is available in the Pixi environment if possible, to ensure that collaborators can run them without having to install additional softare.

For example, a task can run a Python script using a Pixi installed Python environment following a recipe like

  1. Write a Python script, e.g. in scripts/my_task_script.py
  2. Add it as a task to pixi.toml
  3. Run using pixi run my-task

The second step involves adding a section like the one shown below to the pixi.toml file

[tasks.my-task]
cmd = "python scripts/my_task_script.py"
description = "Run custom Python script task."

See the Pixi task documentation for more information.

Examples of project-specific tasks

The structural biology site defines checks for referenced figures, downloads, and PyMOL scripts:

pixi run check-figures
pixi run check-downloads
pixi run check-pymol-scripts

A notebook-producing project may instead render several profiles and rename or copy outputs for use in Colab. Such helpers are not general Quarto commands; use them only in the repository where they are configured.

WarningDo not infer task arguments

New projects should expose student and instructor profile arguments and configure visibility using teaching.show-solutions. Existing repositories may use solution or master for answer-bearing output; read their task definitions before running or documenting a build.