Document how to add dependencies on the Environments page
https://hatch.pypa.io/latest/environment/#dependencies currently says this:
Hatch ensures that environments are always compatible with the currently defined project dependencies (if installed and in dev mode) and environment dependencies.
For example, add
cowsayas a dependency then try to run it:$ hatch run cowsay "Hello, world!"
The detail missing there was how to add a dependency.
I eventually tried adding it to dependencies = in the pyproject.toml file:
dependencies = [
"cowsay"
]
Then I couldn't figure out how to run a command to cause Hatch to install any newly configured dependencies. I was looking for a hatch env update command or similar.
Eventually (after I'd started composing this issue) I realized that running hatch run cowsay -t "Hello, world" installed that dependency since it was missing the first time I ran it.
Relevant documentation section: https://github.com/pypa/hatch/blob/02eb8037fde7c7a9f59c332aa9ff091f3b65f748/docs/environment.md#L74-L81
Thanks, I will do that tonight!