Skip to content

Instantly share code, notes, and snippets.

@reegnz
Last active December 16, 2025 11:53
Show Gist options
  • Select an option

  • Save reegnz/289f77b6845dde7dbb6a51e6e310a0c9 to your computer and use it in GitHub Desktop.

Select an option

Save reegnz/289f77b6845dde7dbb6a51e6e310a0c9 to your computer and use it in GitHub Desktop.
Using uv with direnv
if [ ! -d .venv ] || [ .python-version -nt .venv ]; then
rm -rf .venv
fi
uv sync
source .venv/bin/activate
watch_file .python-version
watch_file pyproject.toml
watch_file uv.lock
watch_file .venv

Using uv with direnv

Put the .envrc in your project folder where pyproject.toml also resides. Then direnv allow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment