Overview Version History Q & A Rating & Review
Shared Venv Activator
A VS Code extension that auto-activates a shared Python virtual environment across multiple projects. Perfect for developers who maintain a single venv for multiple related projects.
Features
Auto-activation on terminal creation
Status bar indicator showing active shared venv
Quick activation command for manual trigger
Cross-platform support (Windows, macOS, Linux)
Custom terminal naming with venv indicator
Configurable via VS Code settings
Default interpreter management for external terminals
Installation
From VSIX file
Download the .vsix file from the latest release
In VS Code, go to Extensions view (Ctrl+Shift+X)
Click the "..." (More Actions) button
Select "Install from VSIX..." and choose the downloaded file
Building from source
# Clone the repository
git clone https://github.com/karthyick/shared-venv-activator.git
cd shared-venv-activator
# Install dependencies
npm install
# Compile the extension
npm run compile
# Package the extension
npx vsce package
# Install the generated .vsix file
code --install-extension shared-venv-activator-0.1.0.vsix
Configuration
Open VS Code Settings and search for "Shared Venv":
Setting
Type
Default
Description
sharedVenv.defaultPath
string
""
Absolute path to your shared venv
sharedVenv.autoActivate
boolean
true
Auto-activate when terminal is created
sharedVenv.terminalName
string
"Shared Python"
Name prefix for terminals
sharedVenv.activateInIntegratedTerminal
boolean
true
Activate in VS Code integrated terminal
sharedVenv.activateInExternalTerminal
boolean
false
Set as default interpreter for external terminals
Example Configuration
Windows:
{
"sharedVenv.defaultPath": "C:\\Users\\YourName\\Source\\code_base\\venv\\shared_venv",
"sharedVenv.autoActivate": true
}
macOS/Linux:
{
"sharedVenv.defaultPath": "/home/username/.venvs/shared_venv",
"sharedVenv.autoActivate": true
}
Usage
Once configured:
Auto-activation : When you open a terminal in VS Code, the shared venv activates automatically
Manual activation : Click the status bar item or use Command Palette → "Shared Venv: Activate Now"
Set path : Use Command Palette → "Shared Venv: Set Shared Venv Path"
Commands
Command
Description
Shared Venv: Activate Now
Manually activate the shared venv
Shared Venv: Open Settings
Open shared venv settings
Shared Venv: Set Shared Venv Path
Quick path configuration
How It Works
On activation, the extension reads your sharedVenv.defaultPath setting
When a new terminal is created, it automatically activates the venv
The terminal prompt shows the venv name in cyan color: [shared_venv]
The status bar shows the active venv name
Comparison to Python Venv Activator
Feature
Python Venv Activator
Shared Venv Activator
Detection
Scans workspace for venv dirs
Uses configured path
Scope
Per-project venv
Global shared venv
Activation
Manual command
Auto on terminal create
Use case
Project-specific deps
Shared deps across projects
Requirements
VS Code 1.60.0 or higher
Python installed on your system
Existing virtual environment
Contributing
Contributions welcome! Feel free to open an issue or submit a pull request.
License
MIT
Publisher : krextensions
Repository : https://github.com/karthyick/shared-venv-activator