A PowerShell script that helps you manage and quickly access your development projects. It allows you to:
- List all your projects from a designated directory
- Open projects in VS Code with a single command
- Automatically open project-related websites (GitHub, documentation, etc.)
- Easily change the projects directory path
- 🚀 Quick project access with simple commands
- 📂 Dynamic project directory configuration
- 💻 Automatic VS Code launch
- 🌐 Bulk-open project-related websites
- 🔧 Easy to configure and customize
- Windows with PowerShell
- Visual Studio Code (with 'code' command available in terminal)
- A directory containing your projects
- Clone this repository or download
ps-work.ps1
git clone https://github.com/lozanasc/ps-work.git
- Create or edit your PowerShell profile to auto-load the script (optional but recommended):
# Check if you have a profile
Test-Path $PROFILE
# Create a profile if it doesn't exist
if (!(Test-Path $PROFILE)) {
New-Item -Type File -Path $PROFILE -Force
}
# Add this line to your profile (edit path according to where you saved the script)
echo ". 'C:\path\to\ps-work.ps1'" >> $PROFILE
- Load the script:
. .\ps-work.ps1
# List all projects in your projects directory
work
# Open a specific project
project projectname
# Change the projects directory path
setpath "D:\MyProjects"
Create a related-sites.txt
file in your project folder to automatically open related websites when launching the project. Add one URL per line:
https://github.com/yourusername/yourproject
https://yourproject-docs.com
https://trello.com/yourprojectboard
- Set your projects directory:
setpath "C:\Users\username\Projects"
- Check available projects:
work
- Open a project:
project myawesome-project
This will:
- Open the project in VS Code
- Open all URLs listed in
related-sites.txt
(if it exists)
The script stores its configuration in ~/.project-config.json
. You can manually edit this file if needed:
{
"projectPath": "C:\\Users\\username\\Projects"
}
You can modify the script to:
- Change the default editor from VS Code
- Add support for additional IDE's
- Modify the configuration file location
- Add more project-specific configurations
Feel free to submit issues and pull requests to improve the script!