ITADN

Support project-local task aliases in pyproject.toml

#19918Closedsaptarshiroy39 创建于 2026-06-19
enhancement
S
saptarshiroy39commented
### Summary Add support for defining project-local task aliases in `pyproject.toml` that can be executed through `uv run`. ### Example Instead of repeatedly running: ```bash uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000 ``` Allow users to define: ```toml [tool.uv.tasks] dev = "uvicorn app.main:app --reload --host 0.0.0.0 --port 8000" test = "pytest" lint = "ruff check ." format = "ruff format ." ``` And then execute: ```bash uv run dev uv run test uv run lint uv run format ``` ### Motivation Many projects have common development commands that are long and frequently used. Benefits: * Reduces repetition of long commands. * Improves onboarding by keeping common workflows in `pyproject.toml`. * Makes project commands self-documenting. * Avoids introducing an additional task runner dependency for simple projects. ### Existing Alternatives Current options include: * Running the full command with `uv run`. * Makefiles. * Justfiles. * Taskipy. * Poe the Poet. These work well, but a lightweight built-in solution could improve the developer experience for smaller projects. ### Example _No response_
关闭于 2026-07-01 1 条评论