Automatic git commit + push with CLI and desktop GUI.
Project description
Automated CLI GitHub Committer
This project provides both a CLI and a desktop GUI that watch a folder and automatically commit + push to GitHub whenever there are git changes.
Prerequisites
- Git installed and on PATH
- Python 3.9+
- GitHub authentication configured (HTTPS + PAT or Git Credential Manager)
CLI Usage
Setup
python autocommit.py setup --remote https://github.com/<user>/<repo>.git
Initializes a git repo if needed, sets the remote and branch, creates an initial commit (if files exist or --allow-empty-initial is used), pushes to GitHub, and writes .autocommit.json.
Run (continuous)
python autocommit.py run
Checks for file changes every interval seconds and automatically commits and pushes when changes are detected.
Run once
python autocommit.py run --once
Runs a single check/commit cycle and exits.
Commit once
python autocommit.py commit
Performs a single commit + push cycle without starting the watcher.
Use a specific folder
python autocommit.py --path "C:\path\to\repo" run
By default, the CLI uses the current directory.
CLI Config
The .autocommit.json file lives in the repo folder and is shared by both CLI and GUI.
remote: GitHub repo URLbranch: branch to push to (defaultmain)interval: seconds between checksmessage_prefix: prefix for auto commit messages
Override run-time settings with --interval or --message.
Auto-commit messages include the timestamp and a short change summary, for example:
Auto commit 2026-06-01 10:12:00+0530 | M app.py (+3 -1); A README.md
Desktop App (Tkinter GUI)
python autocommit_gui.py
The GUI uses the same config file and actions as the CLI.
How to use the GUI
- Click Browse and select the folder to watch.
- Fill in Remote URL (required) and adjust other fields if needed.
- Click Setup Repo once to initialize and push.
- Click Start Watching to auto-commit and push whenever changes appear.
- Click Stop to pause watching.
GUI Controls (every button and field)
| Control | What it does |
|---|---|
| Folder | The local folder to watch and commit from. |
| Browse | Opens a folder picker and loads .autocommit.json if it exists. |
| Remote URL | GitHub repository URL used for origin. |
| Branch | Branch name to push to (default main). |
| Interval (sec) | How often the app checks for changes. |
| Message prefix | Prefix used in auto-commit messages. |
| Git user.name | Optional repo-local git user name (auto-filled from git config when available). |
| Git user.email | Optional repo-local git user email (auto-filled from git config when available). |
| Allow empty initial commit | Lets setup create an empty first commit if the folder has no files. |
| Setup Repo | Initializes git, sets remote/branch/user, creates the first commit, pushes, and saves config. |
| Start Watching | Starts the background watcher that commits + pushes when changes are found. |
| Stop | Stops the watcher. |
| Status line | Shows the latest action or error from the app. |
Single EXE (GUI + CLI)
Build a single Windows EXE that runs the GUI when double-clicked and the CLI when arguments are provided.
python -m pip install pyinstaller
pyinstaller --onefile autocommit_app.py --name AutoCommitter
Usage:
- GUI: double-click
dist\AutoCommitter.exe - CLI: run from a terminal, for example
dist\AutoCommitter.exe setup --remote https://github.com/<user>/<repo>.git
PyPI Package
Once published, install with:
pip install auto-github-committer
Commands:
autocommitter(GUI if no args, CLI if args are provided)autocommitter-cli(CLI only)autocommitter-gui(GUI only)
Publish to PyPI
- Build the package:
python -m pip install build twine
python -m build
- Upload with your PyPI token set in your environment:
setx TWINE_USERNAME __token__
setx TWINE_PASSWORD <your-pypi-token>
python -m twine upload dist\*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 auto_github_committer-0.1.0.tar.gz.
File metadata
- Download URL: auto_github_committer-0.1.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d4d029528fbf18df054a0d4048a0693e151425c079fa931ae935e01d7c5a819
|
|
| MD5 |
8407e410bf9c8002d0ed2021e2f08e71
|
|
| BLAKE2b-256 |
7a929a2c320734f2d4842d39a1af91858e170109365a15c4e8450c60686cca74
|
File details
Details for the file auto_github_committer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: auto_github_committer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc46eda04107e68c489181ad10c6cf57e129a2130d1ccc94b6e7aa37c1932677
|
|
| MD5 |
8f3b58293804aa74cf618ca36fc12c3c
|
|
| BLAKE2b-256 |
556f4772a689ccf7f19ef57b4d8186a2ab50cc087dc3227bb9fa7686f433db46
|