uvshot is a simple, fast script to set up and manage Python virtual environments
using uv in a isolated state. It’s ideal for teams who want a consistent, no-fuss environment setup in their projects.
Before using uvshot, ensure your system meets the following requirements:
-
Bash shell
- The scripts require Bash (tested on macOS Bash 3.2+ and Linux Bash 4+).
- POSIX-compliant shells like
shmay work with modifications, but Bash is recommended.
-
uvCLI tooluvmust be installed and available in your$PATH.- This script uses
uvto download Python, create virtual environments, and install dependencies.
⚠️ uvshotis not compatible with Windows cmd.exe or PowerShell. Use WSL if running on Windows.
Run the following commands from your project directory to download both setup and cleanup scripts:
curl -L https://raw.githubusercontent.com/shafayetShafee/uvshot/v1.0.2/setup.sh -o setup.sh
curl -L https://raw.githubusercontent.com/shafayetShafee/uvshot/v1.0.2/remove-python.sh -o remove-python.shAlways review the downloaded scripts to ensure you trust the content:
less setup.shTo create and activate a Python virtual environment (default version: 3.9.6):
source setup.shOr specify a Python version explicitly, for example:
source setup.sh 3.11.6
# or
# source setup.sh 3.13This will:
-
Create a
.uvshot-envfile with project-specific paths. This dotenv contains the environment variable and value pair used byuvto manage python download and venv creation.WARNING: If your project directory already contains a
.uvshot-envdotenv file, runningsetup.shwill overwrite the existing dotenv file. -
Download python version 3.11.6 in a directory
./pythonwithin your project directory usinguv. -
Create a virtual environment in
./venvdirectory. -
Install dependencies from requirements.txt (if present).
After completion, you’ll see a success message confirming setup.
To remove all managed Python installations and cached data created by uvshot:
source remove-python.shThis will safely delete:
- Installed Python versions under your project’s
pythondirectory - The
uv-cachedirectory - The
.uvshot-envfile created bysetup.sh
- ✅ Works on Linux and macOS (POSIX-compliant shells such as bash or zsh)
⚠️ Not compatible with Windows cmd.exe or PowerShell — use WSL instead- 🔍 Always inspect shell scripts before sourcing them in your environment
Releases are tagged on GitHub. You can use a specific version tag in the download URL for stability, for example:
curl -L https://raw.githubusercontent.com/shafayetShafee/uvshot/v1.0.0/setup.sh -o setup.shAuthor: Shafayet Khan Shafee
License: MIT