Usage#
nur discovers the runnable tasks in your project (from Makefile,
package.json, deno.json/deno.jsonc, composer.json, justfile,
Taskfile, mise.toml, Makefile.toml (cargo-make), moon.yml, the xc
task section of README.md, .vscode/tasks.json, noxfile.py, tasks.py, maskfile.md, Rakefile, Gruntfile.js, gulpfile.js, build.xml, turbo.json, nx.json, workspace member package.json files, and the pdm/poe
tables in pyproject.toml) and runs them from one entry point.
Launch the TUI#
Run nur with no arguments in a project directory to browse and run the
discovered tasks in an interactive terminal UI:
nur
List the discovered tasks#
nur list
Tasks are grouped by their provider prefix (make, npm, deno,
composer, just, task, pdm, poe, tox, mise, cargo-make,
moon, xc, vscode, nox, mask, invoke, rake,
turbo, nx, grunt, gulp, ant, workspace).
Run a task#
Pass a task name. Use the bare name when it is unambiguous, or the
prefix:name form to disambiguate across providers:
nur test
nur make:test
Anything after -- is forwarded verbatim to the underlying runner:
nur test -- --verbose --fail-fast
Print the version#
nur --version
As a library#
The package exposes its version for programmatic use:
>>> import nur
>>> isinstance(nur.__version__, str)
True
Look up the installed distribution version:
"""Look up the version of the installed distribution."""
from importlib.metadata import version
from nur.__metadata__ import PROJECT_NAME
def version_lookup() -> str:
"""Return the installed distribution version for this project.
Returns:
str: The installed distribution version.
"""
return version(PROJECT_NAME)
Or run nur itself from Python:
"""Run nur programmatically."""
from __future__ import annotations
from nur.cli import main
def list_tasks() -> int:
"""Print the tasks discovered in the current directory.
Returns:
int: The exit code ``nur list`` would return.
"""
return main(["list"])