Skip to content

capraCoder/python-project-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

⚡ Python Project Manager for PowerShell

Lightning-fast Python project switching on Windows. No more waiting 10+ seconds for Poetry or fighting with virtualenvwrapper.

PowerShell Python License

✨ Why This Exists

Windows Python developers deserve better than slow, clunky environment switching. This PowerShell script makes project management instant and effortless.

# Before: Poetry workflow (10+ seconds)
cd my-project
poetry shell
poetry install
python main.py

# After: This script (< 1 second)
p03    # Done.

🚀 Features

  • ⚡ Sub-second switching - No more waiting around
  • 🔧 Auto-healing - Broken environments fix themselves
  • 🎯 Smart shortcuts - p01, runproj 13a, mkuse data-analysis
  • 💡 Lazy loading - p001-p999 shortcuts created on-demand
  • 🪟 Windows-native - Embraces PowerShell instead of fighting it
  • 🛡️ Zero configuration - Just run and go

📦 Quick Start

Installation

# Download and add to your PowerShell profile
iwr -Uri "https://raw.githubusercontent.com/capraCoder/python-project-manager/main/ProjectManager.ps1" -OutFile "$env:TEMP\ProjectManager.ps1"
Get-Content "$env:TEMP\ProjectManager.ps1" | Add-Content $PROFILE
. $PROFILE

Basic Usage

# Create and switch to new project
mkuse data-analysis

# Quick numbered projects  
newproj 03
useproj 03
p03                    # Run project03

# Named projects
newproj web-scraper
runproj web-scraper

# Smart shortcuts
runproj 13a           # Runs project13a
runproj fisheries     # Runs fisheries project
whichproj            # Shows current project

🎯 Workflow Examples

Rapid Prototyping

mkuse experiment-01   # Create + switch instantly
# Edit code in VS Code (auto-opens)
runproj              # Test immediately

Project Juggling

p03                  # Work on project03
useproj data-clean   # Switch to data cleaning
p07                  # Quick test of project07
useproj experiment   # Back to experiments

Learning & Practice

# Create practice projects for different topics
mkuse algorithms
mkuse web-scraping  
mkuse data-viz
mkuse ml-basics

# Switch between them instantly
useproj algorithms
# ... practice coding ...
useproj web-scraping
# ... try web scraping ...

📊 Performance

Operation Poetry virtualenvwrapper This Script
Create project ~15s ~8s ~2s
Switch project ~10s ~3s <1s
Run script ~8s ~2s <1s

Tested on Windows 11, Python 3.11, average of 10 runs

🧠 Smart Features

Intelligent Project Naming

runproj 3      # → project03
runproj 03     # → project03  
runproj 03a    # → project03a
runproj 123b   # → project123b

Auto-Healing

Projects automatically repair themselves if virtual environments or scripts are missing.

Lazy Loading

Functions p001 through p999 are created on-demand - zero startup cost, infinite scale.

Safe Editing

editproj opens VS Code if available, falls back to Explorer if not.

🛠️ All Commands

Command Description Example
newproj <name> Create new project newproj data-analysis
useproj <name> Switch to project useproj web-scraper
runproj [name] Run project script runproj or runproj 03a
mkuse <name> Create and switch mkuse experiment
whichproj Show current project whichproj
editproj [name] Open in editor editproj
lsproj List all projects lsproj
p<nn> Quick run project p03, p247
p [name] Universal runner p 03a or p

🎨 Customization

Edit these variables at the top of the script:

$Base = "C:\Code"           # Your projects folder
$PyVer = "3.13"            # Python version

🤝 Requirements

  • Windows 10/11 with PowerShell 7.0+
  • Python 3.8+ with py launcher
  • VS Code (optional, for editproj)

🏗️ How It Works

Each project is a self-contained folder with:

project03/
├── .venv/              # Virtual environment
├── project03.py        # Main script
└── [your files]        # Whatever you add

The script maintains a project00 working directory that mirrors your current project, plus a .CURRENT file tracking which project is active.

🎯 Why PowerShell?

Most Python project managers are designed for bash/zsh. This script embraces PowerShell's strengths:

  • Rich error handling with proper exceptions
  • Object pipeline for clean data flow
  • Native Windows integration without awkward cross-platform compromises
  • Advanced scripting with closures, regex objects, and event hooks

🤖 AI-Human Collaboration

This script was crafted through iterative collaboration between AI and human developers, combining:

  • AI: Pattern recognition, optimization techniques, comprehensive feature coverage
  • Human: Real-world workflow insights, edge case handling, Windows-specific optimizations

The result is something neither could have created alone - a tool that's both technically sophisticated and practically useful.

📄 License

MIT License - feel free to modify and distribute.

🙏 Contributing

Issues and PRs welcome! This tool gets better with real-world usage and feedback.


Made with ⚡ by the PowerShell + Python community

About

⚡ Lightning-fast Python project switching for Windows PowerShell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published