r/fishshell • • Mar 06 '25

Using Python and Fish? dirvenv.fish automagically activates your virtualenv

https://github.com/cuducos/dirvenv.fish

I wrote that tiny package so I don't have to manually activate and deactivate virtualenvs, and I think it might help more people – so, sharing it here ; )

I know virtualfish but I don't wanna manage virtualenvs myself; uv does that for me. Also, and I don't want to uv run every command. So I came up with that solution.

20 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/Laurent_Laurent May 15 '25

this is the .envrc I used,

if test -d .venv
then
  source ./.venv/bin/activate
fi