Hacker News new | ask | show | jobs
by mk12345 528 days ago
I think it does! uv add [0] adds a dependency to your pyproject.toml, as well as your environment.

If you change your pyproject.toml file manually, uv sync [1] will update your environment accordingly.

[0]: https://docs.astral.sh/uv/guides/projects/#managing-dependen... [1]: https://docs.astral.sh/uv/reference/cli/#uv-sync

1 comments

If I read [1] correctly, it seems it checks against lockfile, not pyproject.toml. So it seems like it won't help if I change pyproject.toml manually. Which is a big inconveniece, if so.

Whatever, I think I'll try it for myself later today. It's long overdue.

Most uv commands will (unless otherwise instructed like e.g. with --frozen) by default update your lockfile to be in sync with your pyproject.toml.