Skip to main content

jnc task

Manages tasks defined in the workspace manifest. Tasks are commands that run inside the workspace environment and can depend on other tasks.

Usage

jnc task <SUBCOMMAND>

Subcommands

add

Add a new task to the manifest.
jnc task add <NAME> <COMMAND> [OPTIONS]
OptionShortDescription
--depends-onTasks that must run before this task (comma-separated or repeated)
--platform-pLimit the task to specific platforms
--feature-fAdd the task to a specific feature
--cwdSet the working directory for the task
--envSet environment variables (format: KEY=VALUE)
--descriptionA human-readable description of the task
--clean-envRun the task with a clean environment (no inherited variables)

remove

Remove one or more tasks from the manifest.
jnc task remove <NAMES>... [OPTIONS]
OptionShortDescription
--platform-pRemove a platform-specific task
--feature-fRemove a task from a specific feature

alias

Create a task alias that depends on other tasks. An alias has no command of its own — it simply runs its dependencies.
jnc task alias <NAME> <DEPENDS_ON>... [OPTIONS]
OptionShortDescription
--platform-pLimit the alias to specific platforms
--feature-fAdd the alias to a specific feature
--descriptionA human-readable description of the alias

list

List all tasks defined in the manifest.
jnc task list [OPTIONS]
OptionShortDescription
--environment-eShow tasks for a specific environment
--summary-sShow a condensed summary

Global Options

OptionShortDescription
--manifest-path-mPath to pixi.toml or pyproject.toml

Examples

# Add a simple task
jnc task add build "make build"

# Add a task with a dependency
jnc task add test "pytest tests/" --depends-on build

# Add a platform-specific task
jnc task add setup "bash setup.sh" --platform linux-aarch64

# Add a task to a feature
jnc task add lint "ruff check ." --feature dev

# Add a task with environment variables and a working directory
jnc task add serve "python -m http.server" --cwd ./dist --env PORT=80

# Add a task with a description
jnc task add docs "sphinx-build docs/ docs/_build" --description "Build documentation"

# Create an alias that runs multiple tasks
jnc task alias ci lint test build

# Remove a task
jnc task remove build

# Remove a platform-specific task
jnc task remove setup --platform linux-aarch64

# List all tasks
jnc task list

# List tasks for a specific environment
jnc task list --environment test

# Show a summary of tasks
jnc task list --summary