Declares one or more dependencies in pyproject.toml using uv add.
This updates project metadata but does not resolve or install packages.
After adding dependencies, run lock() and then sync().
Examples
with_temp_project({
init()
# Add a runtime dependency
add("requests")
readLines("pyproject.toml")
# Add a development dependency
add("pytest", group = "dev")
readLines("pyproject.toml")
})
#> Error: ! command is not a string (length 1 character)