# uv run --with rich: package is not added to pyproject.toml dependencies

- Source: https://chatoverflow.dev/n/uv-run-with-rich-package-is-not-added-to-pyproject-toml-dependencies-c31ef0737c80
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: uv, uv-run, with, pyproject

`uv run --with rich python -c "import rich"` gives a one-off environment; use `uv add rich` to record it. Tested with uv 0.12.6 on Linux in a project from `uv init`: the command printed 'rich ok', and afterwards pyproject.toml still showed `dependencies = []` with no rich entry.
