Automates virtual environment management for Git repositories
Project description
🧩 gvit
Automates virtual environment management for Git repositories.
gvit is a command-line tool that automatically creates and synchronizes a virtual environment whenever you clone or update a repository. Its goal is to eliminate friction between version control and Python environment management.
🚀 Motivation
Have you ever cloned a project and had to do all this?
git clone https://github.com/someone/project.git
cd project
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
With gvit, all of that disappears. When you clone, you'll already have a ready-to-use virtual environment configured with the repo dependencies.
gvit clone https://github.com/someone/project.git
🎉 And you are ready to work!
⚙️ What gvit does
- 🪄 Automatically creates a virtual environment when cloning a repo.
- 🔄 Synchronizes dependencies when running
gvit pull(ifpyproject.toml,requirements.txt, etc. have changed). - 🧠 Remembers your preferred backend (
venv,virtualenv,conda,pyenv, etc.). - 🪶 Does not interfere with Git: it just enhances the workflow.
- 🧰 Optionally generates aliases to integrate commands with Git.
💻 Installation
The package is called
gviton PyPI, but the command isgvit.
pip install gvit
Or with pipx (recommended for CLI tools):
pipx install gvit
🧩 Basic Usage
🌀 Clone a repo and create its environment
gvit clone https://github.com/yourorg/my-project.git
Automatically creates a virtual environment named after the repository (e.g., .venv-my-project) and initializes it with dependencies.
🔄 Synchronize dependencies when updating
gvit pull
Runs git pull and, if dependencies have changed, updates the environment.
⚙️ Configure automatic aliases
gvit create-aliases
Creates a git() function in your shell (Bash or Zsh) that intercepts only relevant commands:
git clone ... → gvit clone ...
git pull ... → gvit pull ...
Does not affect git commit, push, or other commands.
To revert the aliases:
gvit remove-aliases
🧠 How it works internally
-
Detects the repository name from the URL or local folder.
-
Uses your preferred backend (configurable) to create the environment:
venv(default)virtualenvcondapyenv
-
Associates the environment with the repo via a small
.gvitmetadata file. -
On each
pull, checks if dependency files (requirements.txt,pyproject.toml,environment.yml, etc.) have changed. -
If they have, automatically updates the environment.
⚙️ Local Configuration
Preferences can be set in a global configuration file:
~/.config/gvit/config.toml
Example:
[settings]
backend = "conda"
auto_update = true
default_env_dir = ".venv"
🧱 Architecture (in development)
git_venv/
├── cli.py # CLI entry point
├── backends/ # Integrations with venv, conda, pyenv, etc.
├── git_utils.py # Functions for clone, pull, etc.
├── env_manager.py # Core logic for creation and synchronization
└── shell_utils.py # Automatic alias/function creation
🧭 Roadmap
| Version | Status | Description |
|---|---|---|
| 0.0.1 | ✅ Initial publication on PyPI (name reservation) | |
| 0.1.0 | 🔧 Minimal CLI (clone, pull, --help) |
|
| 0.2.0 | 🧰 Support for conda, virtualenv, pyenv |
|
| 0.3.0 | 🪄 Automatic alias system | |
| 0.4.0 | ⚙️ Global and local configuration | |
| 0.5.0 | 🚀 Smart detection of dependency changes | |
| 1.0.0 | 🎉 Stable release |
🧑💻 Example workflow
# Set preferred backend
gvit config --backend conda
# Clone project and create environment
gvit clone https://github.com/example/project.git
# Activate the environment
source .venv-project/bin/activate
# Sync after repo update
gvit pull
⚖️ License
MIT © 2025 — Your Name
💬 Contributing
Contributions are welcome! Open an issue or submit a pull request on GitHub.
⭐ Vision
“One repo, its own environment — without thinking about it.”
The goal of gvit is to eliminate the need to manually create or update virtual environments. Git and Python should work together seamlessly — this tool makes it possible.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gvit-0.0.2.tar.gz.
File metadata
- Download URL: gvit-0.0.2.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff0de4f40470f9367931221590115271b4975a023ed680cb5e423e206d6235a7
|
|
| MD5 |
2e067050ff42de24175204403383a724
|
|
| BLAKE2b-256 |
8f838e5f1e7b21f991c88fe87be3a5d18e7e3533353cb345abd401608187b124
|
File details
Details for the file gvit-0.0.2-py3-none-any.whl.
File metadata
- Download URL: gvit-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87398f2940dcbff3961825bcbbd8d066d77c584ea7c0d0913670dc25fc31290d
|
|
| MD5 |
50ece5b0d0b370458e6b2de784d5f6c2
|
|
| BLAKE2b-256 |
cd3a3ad615a74f247cce0aa18c70ec9eec4f83ef61e932c04c9fcb00252d31ed
|