This repository contains automation scripts for creating new development projects across different operating systems (Windows, Mac, and WSL). The scripts automatically set up a new project with a conda environment, Git repository, and basic project structure.
- Creates a new project directory
- Initializes a conda environment with specified Python version
- Sets up Git repository
- Creates .gitignore file with common Python ignores
- Creates initial README.md
- Opens VSCode automatically
- Creates GitHub repository (if GitHub CLI is installed)
- Cross-platform support (Windows, Mac, WSL)
- Python (3.10 or later)
- Conda package manager
- Git
- Visual Studio Code
- GitHub CLI (optional, for automatic repository creation)
- Clone this repository:
git clone git@github.com:Zakk-Yang/auto-project-creation.git
- Choose the appropriate version for your operating system:
- Copy
create_project_win.py
andcreate_project_win.bat
to your desired location - Edit the
BASE_DIR
increate_project_win.py
to your preferred project directory - Edit the
SCRIPT_PATH
increate_project_win.bat
to point to your Python script
- Copy
create_project_mac.py
andcreate_project_mac.sh
to your desired location - Edit the
BASE_DIR
increate_project_mac.py
to your preferred project directory - Make the shell script executable:
chmod +x create_project_mac.sh
- Edit the
SCRIPT_PATH
increate_project_mac.sh
to point to your Python script
- Copy
create_project.py
andcreate_project.bat
to your desired location - Edit the
BASE_DIR
increate_project.py
to your preferred project directory - Edit the
SCRIPT_PATH
increate_project.bat
to point to your Python script
Double-click the create_project_win.bat
file or run it from the command prompt:
create_project_win.bat
Run the shell script:
./create_project_mac.sh
Double-click the create_project.bat
file or run it from the command prompt:
create_project.bat
To change the Python version, edit the PYTHON_ENV_VER
variable in the respective Python script:
PYTHON_ENV_VER = "3.10" # Change to your desired version
Edit the BASE_DIR
variable in the respective Python script:
BASE_DIR = "D:\\icloud\\iCloudDrive\\developer"
BASE_DIR = os.path.expanduser("~/iCloudDrive/developer")
BASE_DIR = "/mnt/c/Users/username/iCloudDrive/developer"
Each project created will have the following structure:
project_name/
├── .git/
├── .gitignore
└── README.md
The scripts include error handling for:
- Missing prerequisites
- Invalid project names
- Git initialization failures
- Conda environment creation issues
- File system operations
- GitHub repository creation errors
-
Conda not recognized
- Ensure Conda is installed and in your system PATH
- Try running
conda init
in your terminal
-
GitHub CLI not found
- Install GitHub CLI or use manual repository creation
- Run
gh auth login
to authenticate
-
VSCode not opening
- Ensure VSCode is installed and in your system PATH
- Try running
code .
in terminal to verify
-
Git errors
- Ensure Git is installed and configured
- Check if you have SSH keys set up for GitHub
Feel free to submit issues, fork the repository, and create pull requests for any improvements.
This project is licensed under the MIT License - see the LICENSE file for details.
Zakk Yang
- Inspired by the need to automate repetitive project setup tasks
- Thanks to the open-source community for various tools and inspiration