How do I add a dependency to a group like dev using uv add?
- User
How do I add a dependency to a group like dev using uv add?
- Assistant
To add a dependency to a specific group like
devusinguv, you can use the--groupoption with theuv addcommand.✅ Syntax:
uv add --group dev <package-name>📌 Example:
To add
pytestas a development dependency:uv add --group dev pytestThis will install
pytestand add it under the[tool.pdm.dependencies.dev]section in yourpyproject.toml(assuming you're using a PEP 621-compatible tool like PDM or Poetry that integrates with).
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.