[metadata] name = "python-venvs" description = "Find Python virtual environments" requirements = ["find"] [source] command = "find ~ -maxdepth 5 -type f -name 'pyvenv.cfg' 2>/dev/null | xargs -I{} dirname {}" [preview] command = "cat '{}/pyvenv.cfg' 2>/dev/null && echo '' && echo 'Packages:' && '{}/bin/pip' list --format=columns 2>/dev/null | head -20" [actions.activate] description = "Open a shell with the selected venv activated" command = "source '{}/bin/activate' && $SHELL" mode = "execute" [actions.packages] description = "List all packages in the selected venv" command = "'{}/bin/pip' list | less" mode = "execute"