Description
For those of us migrating over from Rye, one of its nice features is the built-in task runner using rye run
and [tool.rye.scripts]
. For example:
[tool.rye.scripts]
hello = "echo Hello from Rye!"
$ rye run hello
Hello from Rye!
It could have some more features - here is a selection of feature requests from the community:
- Allow shell expansion/interpolation in rye run command rye#695
- Allow to define local variable in rye scripts rye#652
- ✨ Allow passing cwd in
tool.rye.scripts
rye#930 - Support for pre-/post-hooks in Rye custom scripts rye#1243
A lot of these requested features are things that other 3rd party tools currently offer. I thought it might be useful to highlight a few other tools here, in particular because they also integrate with the pyproject.toml
ecosystem and can be used with uv today.
-
Poe the Poet
https://github.com/nat-n/poethepoet
uv add --dev poethepoet
[tool.poe.tasks] hello = "echo Hello from poe!"
$ uv run poe hello Poe => echo Hello from 'poe!' Hello from poe!
-
taskipy
https://github.com/taskipy/taskipy
uv add --dev taskipy
[tool.taskipy.tasks] hello = "echo Hello from taskipy!"
$ uv run task hello Hello from taskipy!
Perhaps these can serve as some inspiration for a future uv run
task runner and also in the meantime offer a solution for people coming over from Rye looking for a way to run tasks.
Activity