@@ -5,6 +5,7 @@ Currently three modes for using autohooks are supported:
55* ` pythonpath `
66* ` poetry `
77* ` pipenv `
8+ * ` uv `
89
910These modes handle how autohooks, the plugins and their dependencies are loaded
1011during git hook execution.
@@ -14,13 +15,13 @@ and no mode is set during [activation](./installation.md), autohooks
1415will use the [ pythonpath mode] ( #pythonpath-mode ) by default.
1516
1617``` {note}
17- `poetry` or `pipenv ` modes leverage the `/usr/bin/env` command using the
18+ `poetry`, `pipenv` or `uv ` modes leverage the `/usr/bin/env` command using the
1819`--split-string` (`-S`) option. If `autohooks` detects that it is
1920running on an OS where `/usr/bin/env` is yet to support _split_strings_
2021(notably ubuntu < 19.x), `autohooks` will automatically change to an
21- internally chosen `poetry_multiline`/`pipenv_mutliline` mode. The
22+ internally chosen `poetry_multiline`/`pipenv_mutliline`/`uv_multiline` mode. The
2223'multiline' modes *should not* be user-configured options; setting your
23- project to use `poetry` or `pipenv` allows team members the greatest
24+ project to use `poetry`, `pipenv` or `uv` allows team members the greatest
2425latitude to use an OS of their choice yet leverage the sane
2526`/usr/bin/env --split-string` if possible. Though `poetry_multiline`
2627would generally work for all, it is very confusing sorcery.
@@ -44,7 +45,7 @@ this mode with a virtual environment is that [activating the environment](https:
4445has to be done manually.
4546
4647To benefit from the advantages of a virtual environment a much better choice is
47- to use [ poetry] or [ pipenv ] for managing the virtual environment automatically.
48+ to use [ poetry] , [ pipenv ] or [ uv ] for managing the virtual environment automatically.
4849
4950## Poetry Mode
5051
@@ -67,5 +68,14 @@ installation is deterministic and reliable between different developer setups.
6768In contrast to the ` pythonpath ` mode the activation of the virtual environment
6869provided by [ pipenv] is done automatically in the background.
6970
71+ ## uv Mode
72+
73+ With the ` uv ` mode it is possible to run autohooks in a
74+ dedicated environment controlled by [ uv] . By using the ` uv ` mode the
75+ virtual environment will be activated automatically in the background when
76+ executing the autohooks based git commit hook. All dependencies are managed
77+ by uv using the ` pyproject.toml ` and ` uv.lock ` files.
78+
7079[ pipenv ] : https://pipenv.readthedocs.io/en/latest/
7180[ poetry ] : https://python-poetry.org/
81+ [ uv ] : https://docs.astral.sh/uv/
0 commit comments