diff --git a/.envrc b/.envrc index 1125cce..70bafff 100644 --- a/.envrc +++ b/.envrc @@ -1,3 +1,18 @@ #!/usr/bin/env sh +use_uv_python() { + if command -v uv >/dev/null 2>&1; then + activate='.venv/bin/activate' + if [ -f $activate ]; then + # shellcheck source=/dev/null + . $activate + else + uv venv + fi + uv sync --all-extras --all-groups --active --locked + else + echo_date "ERROR: 'uv' not found" && exit 1 + fi +} + use_uv_python