Initialize Git/GitHub backup, auto backup hooks, and releases for a project.
Project description
pro-inital
pro-init turns the current directory into a Git-backed project with optional GitHub backup, automatic push hooks, idle-time auto backup, and a first GitHub Release.
Chinese documentation: README_zh.md
What it is for
Use pro-init when you start or inherit a local project and want a repeatable safety baseline:
- initialize Git if the directory is not already a repository
- configure Git identity when missing
- check
git, GitHub CLIgh, and Chocolatey on Windows - guide GitHub CLI login
- exclude files larger than 10 MB from Git backup
- create a GitHub remote repository when requested
- commit the current project state
- create a first GitHub Release when requested
- install project-level scripts under
.pro_init/ - install a
post-commithook that pushes after every commit - optionally install a Windows scheduled task that watches the project and auto commits/pushes after files become idle
Install
python -m pip install pro-inital
For local wheel testing:
python -m pip install .\dist\pro_inital-0.1.3-py3-none-any.whl
Quick start
Open PowerShell in the project directory:
cd path\to\your\project
pro-init
Follow the prompts. The default flow creates a private GitHub repository and a first release.
Common commands
Initialize with no GitHub remote:
pro-init --no-remote
Create a public GitHub repository instead of private:
pro-init --public
Choose a repository name:
pro-init --repo-name MyProject
Choose the first release tag:
pro-init --release-version v0.1.0
Generated files
Generated project scripts are placed under:
.pro_init/
The main generated scripts are:
.pro_init/git_backup.ps1: commit and push current changes.pro_init/auto_backup_watch.ps1: watch files and auto backup after idle time.pro_init/install_auto_backup_task.ps1: install the Windows scheduled task.pro_init/create_release.ps1: create a GitHub Release from a clean working tree
Automatic backup
pro-init installs a local Git hook:
.git/hooks/post-commit
The hook pushes automatically after each commit, but only when origin exists.
If you accept the scheduled task prompt, a Windows task starts the watcher after login. The watcher waits until file activity has been idle, then runs:
git add .
git commit -m "Auto backup <timestamp>"
git push
This is designed for small project code changes. Keep generated build outputs ignored.
Large file rule
Files larger than 10 MB are written to .gitignore before backup. The generated backup script also rescans for new large files before committing.
This avoids accidentally committing maps, datasets, bitstreams, videos, logs, or archives. Use Git LFS or external storage for large artifacts.
Release policy
Automatic backups are for history and recovery. Releases should represent stable milestones.
Create a release manually from a clean repository:
.\.pro_init\create_release.ps1 -Version v0.1.1 -Title "Stable milestone"
Requirements
- Python 3.9+
- Windows PowerShell for auto-install and scheduled-task features
- Git
- GitHub CLI
gh - Chocolatey only when
gitorghneed to be installed automatically on Windows
Troubleshooting
Check GitHub login:
gh auth status
Check remote:
git remote -v
Check current Git state:
git status
Start the generated watcher task manually:
Start-ScheduledTask -TaskName "ProInit_AutoBackup_<project_name>"
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
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 pro_inital-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pro_inital-0.1.3-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5805f43f4b6503f278d42289f61889a49c19b865060023852db78d2b770a8fa5
|
|
| MD5 |
0669de5b1e98a97fb578b9a60b3cc0bd
|
|
| BLAKE2b-256 |
e0e94698397caa4b914dc17bb7e675596a81187feef4bbfa47afecac6f05c60d
|