Automatic GitHub commit bot that logs developer activity.
Project description
๐ AutoCommitBot (v1.4.0)
Maintain a professional GitHub presence with AI-powered automation and built-in security.
AutoCommitBot is an intelligent CLI tool for developers who want a consistent contribution history without the manual overhead. It monitors your local repositories, generates meaningful commit messages using Google's Gemini AI, and manages the full Git lifecycle automatically โ all authenticated through the GitHub CLI so no tokens or passwords ever need to be configured by hand.
๐ฅ๏ธ Preview
๐ Why AutoCommitBot?
- Zero-friction auth โ Piggybacks on your existing
ghlogin; no tokens, no PATs, no manual username entry - AI Commit Messages โ Generates meaningful, context-aware commits instead of generic updates
- Security (Secret Shield) โ Prevents accidental exposure of sensitive files and credentials
- Natural Activity Mode โ Simulates realistic developer commit patterns
- Manual vs. Background Control โ [NEW] Choose between interactive manual runs and strictly automated background heartbeats
- Backup & Restore โ Enables complete rollback of local and remote states
- Automated Execution โ Runs seamlessly in the background on system logon
โจ Features
Core Capabilities
- GitHub CLI Auth โ Identity verified through your active
ghsession; repos fetched & cloned viaghautomatically - AI Commit Generation โ Context-aware commit messages using Gemini with model fallback
- Security Layer (Secret Shield) โ Automatic protection against sensitive file and credential exposure
- Interactive Manual Mode โ [NEW] Choose whether to commit real work or perform a Heartbeat commit manually
- Strict Background Heartbeats โ [NEW] Background tasks now strictly perform "Random Activity" commits to maintain streaks without cluttering code history
- Scheduling Engine โ Supports logon, fixed-time, and natural activity-based execution
- Backup & Restore โ Pre-commit snapshots with full local and remote rollback capability
- Dashboard & Analytics โ CLI-based insights into commit history and activity
- Execution Reliability โ Built-in retry logic, conflict handling, and network checks
- Decent CLI Theme โ Clean, professional, and subtle color-coded output for repository tracking
- Secret Shield โ Now includes refined visual markers for protected and exposed files
๐ View Full Feature Breakdown
โ๏ธ Setup & Configuration
- Identity verified via GitHub CLI (
gh auth login) โ no username prompt, no tokens - Repository list fetched with
gh repo list(authenticated) - Interactive multi-select repo setup
- Base folder configuration
- Automatic cloning via
gh repo clone(inherits yourghsession) - Git authentication verification
- Backward navigation during setup
๐ Scheduling System
- Logon trigger (Windows Task Scheduler) โ Strictly performs Random Activity (Heartbeat) commits in the background
- Fixed-time daily scheduling
- Randomized daily execution (9 AM โ 11 PM)
- Natural Activity Mode (probabilistic commits with 48h enforcement)
- Runs with highest privileges
- Works on battery power
๐ Commit Engine
- Smart change detection across repositories
- Manual Run: Interactive menu to choose between User Changes vs. Heartbeat
- Background Run: Strictly Heartbeat (Random Activity) mode
- Automatic pull โ merge โ push workflow
- Push retry logic on failure
๐ค AI Commit System
- Gemini AI integration for commit messages
- AI Key Validation โ Real-time verification of your API key during setup
- Model fallback chain: 2.5 Flash โ 2.0 Flash โ 1.5 Flash โ Pro
- Diff truncation for large inputs (8000 chars)
๐พ Backup & Restore
- ZIP snapshot before every commit
- Configurable backup retention (
config-backup) - Restore command with snapshot selection
- Automatic GitHub rollback via force push
- Clear all backups on demand (
clear-backups)
๐ Dashboard & Management
- Dashboard with last 50 commits (rich table view)
- Commit classification (User vs Activity)
- Status command for tracked repos
- Add/remove repositories dynamically
- Persistent history tracking (500 entries)
- Clean uninstall command โ removes scheduler task before uninstalling
- Version check command โ shows installed version and detects available updates
๐ Reliability Layer
- Internet availability check (retry up to 2 minutes)
- Automatic admin privilege escalation
- Resilient Git operations with fallback handling
โ๏ธ How It Works
- Verifies your GitHub identity via the GitHub CLI (
gh) - Detects changes in tracked repositories
- Syncs with remote using
git pull - Analyzes
git diffusing Gemini AI (in Manual mode) - Generates a contextual commit message
- Runs security checks (Secret Shield)
- Commits and pushes changes
- Stores a backup snapshot
All of this runs automatically in the background.
๐ Getting Started
Prerequisites
Before installing AutoCommitBot, make sure you have all of the following:
| Requirement | Why it's needed | Get it |
|---|---|---|
| Python 3.8+ | Runtime | python.org |
| Git | Version control | git-scm.com |
GitHub CLI (gh) |
Identity verification & repo access | cli.github.com |
| Gemini API key (optional but recommended) | AI-generated commit messages | aistudio.google.com |
Important: AutoCommitBot v1.2.7+ requires the GitHub CLI. It uses your existing
ghlogin to verify who you are and to fetch and clone your repositories โ no passwords or personal-access tokens needed.
Step 0 โ Install & authenticate the GitHub CLI
If you haven't already:
# macOS (Homebrew)
brew install gh
# Windows (winget)
winget install --id GitHub.cli
# Debian / Ubuntu
sudo apt install gh
Then sign in:
gh auth login
Follow the interactive prompts (choose HTTPS, then authenticate via browser). Confirm it worked:
gh auth status
# โ โ Logged in to github.com as YourUsername
๐ฆ Installation
Option 1: Via pip (Recommended)
pip install autocommitbot
Option 2: From Source
git clone https://github.com/RohitKSahoo/auto-commit-bot.git
cd auto-commit-bot
pip install -e .
๐ ๏ธ First-Time Setup
Run the setup wizard once after installation:
autocommit setup
The wizard will:
- Verify your GitHub identity via
gh auth statusโ no username prompt - Fetch your repositories from GitHub using
gh repo list - Let you select which repos to automate (multi-select checklist)
- Ask for a base folder where repos should be cloned if not already present
- Ask you to pick a schedule (on logon / fixed time / natural activity)
- Optionally let you enter a Gemini API key for AI commit messages
Tip: Running
autocommit setupagain on an already-configured machine shows a short menu so you can update just one section (Repositories, Schedule, or AI key) without repeating the full wizard. On a fresh install the full wizard always runs โ no menu.
๐ ๏ธ Usage
All commands follow the pattern: autocommit <command>
Run
autocommit <command> --helpfor full details on any command.
โ๏ธ Setup & Config
| Command | What it does |
|---|---|
autocommit setup |
First-time wizard, or edit repos / schedule / AI |
autocommit config-backup <days> |
Set how long backups are kept |
๐ Repositories
| Command | What it does |
|---|---|
autocommit add [path] |
Track a new local git repo |
autocommit remove |
Stop tracking a repo |
autocommit status |
List all tracked repos |
๐ Automation
| Command | What it does |
|---|---|
autocommit run |
[Interactive] Commit changes or heartbeat now |
autocommit enable |
Register the Windows auto-start task |
autocommit disable |
Remove the Windows auto-start task |
๐ History & System
| Command | What it does |
|---|---|
autocommit dashboard |
View commit history & stats |
autocommit restore |
Roll back a bot commit from snapshot |
autocommit clear-backups |
Delete all backup snapshots to free disk space |
autocommit version |
Check installed version & updates |
autocommit uninstall |
Remove scheduler task then pip uninstall |
โ ๏ธ Notes
- GitHub CLI required โ
autocommit setupwill exit with a clear error ifghis not installed or you're not logged in - Automation runs only on tracked repositories
restoreperforms a force push โ rewrites remote history, use with cautionrunis for manual triggering, not regular use- Internet connection required for push, version check, and AI commit messages
- On Logon mode caps random activity at 5 per calendar day โ real code changes always push through, even after the cap is reached
- Always use
autocommit uninstallinstead ofpip uninstalldirectly โ running pip uninstall alone will leave an orphaned task in Windows Task Scheduler that silently fails on every trigger
๐ Staying Up to Date
Run the following command to check your current version and see if a newer release is available:
autocommit version
Example output when up to date:
AutoCommitBot v1.3.0
Checking for updates...
โ You are on the latest version (1.3.0).
๐ New in this version (v1.3.0):
โข Fixed background hangs in Task Scheduler by redirecting output to logs
โข Added global timeouts to all Git operations to prevent indefinite stalls
โข Fixed encoding crashes on Windows (UTF-8 support for log files)
โข Optimized Secret Shield performance for faster repository scanning
โข Shortened scheduler commands to fit within Windows path limits
Example output when an update is available:
AutoCommitBot v1.2.7
Checking for updates...
โก New version available: 1.2.8 (you have 1.2.7)
๐ What's New in v1.2.9:
โข Refined, easier-on-the-eyes color theme for better commit and security tracking
โข Setup wizard now pre-selects existing repos and suggests your base folder
โข Fixed a bug in the setup flow that prevented repository updates from saving
Run to update: pip install --upgrade autocommitbot
To update manually at any time:
pip install --upgrade autocommitbot
๐ Security Notes
- Your code is not stored externally (only analyzed for commit messages)
- Sensitive files are automatically excluded via
.gitignore - Identity is verified through your local
ghsession โ no credentials are stored by AutoCommitBot restoreuses force push โ use with caution
๐ Support & Contributions
- Report issues: https://github.com/RohitKSahoo/auto-commit-bot/issues
- Contributions welcome (see
CONTRIBUTING.md) - Additional docs in
/docs
๐ค Maintainer
Maintained by @RohitKSahoo
๐ License
This project is licensed under the GNU General Public License v3.0.
You are free to use, modify, and distribute this software under the terms of the license. Any derivative work must also be open-sourced under GPL v3.
See the LICENSE file for full details.
๐งพ TL;DR
AutoCommitBot is a smart Git automation layer with AI, security, and recovery built in โ authenticated entirely through your existing GitHub CLI session.
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 autocommitbot-1.4.1.tar.gz.
File metadata
- Download URL: autocommitbot-1.4.1.tar.gz
- Upload date:
- Size: 38.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ce972a2891bbfdd5b8ee2dd5ad128fcc2142b0bba8669d839659ff07aabec8a
|
|
| MD5 |
b8207c2790d39c993a8d1b8e7878495d
|
|
| BLAKE2b-256 |
5cde4a06d8eb26a32ba8afb0907511676a0c6f9a3cb540fa89b6d946010d423f
|
File details
Details for the file autocommitbot-1.4.1-py3-none-any.whl.
File metadata
- Download URL: autocommitbot-1.4.1-py3-none-any.whl
- Upload date:
- Size: 37.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b94c31afba8234af1f22f0a263c4289cbc73836b14286b21f0090871be2ee513
|
|
| MD5 |
c1b5fec5aa68cf291e20dd264ed4eb20
|
|
| BLAKE2b-256 |
09729c5edd54d7bd698fb20c6699d97f3466291681ecc15f09dd5ba86e7e3bfb
|