Close your laptop lid.
Your code is already committed.
Never lose progress again. LidCommit sits in your system tray and monitors active IDE workspaces. When you close your laptop, it synthesizes AI commit messages, commits your diff, and pushes directly to GitHub.
Tray app with pause toggles & activity history.
Selectively skip repos from auto-committing.
Commit and push on-demand without closing lid.
Clean auto-save timestamps if offline or no key.
Download LidCommit
Installs just like any standard modern desktop app. No Rust toolchain, terminal commands, or manual compiling needed for end users.
LidCommit 1-Click Setup Wizard
Double-click and run. Installs cleanly to %LocalAppData%\Programs\LidCommit with automatic Start Menu and Desktop shortcuts.
Docks straight into your system tray on launch.
Optional startup protection enabled in 1 checkbox.
Standard removal via Windows Settings / Apps.
Installing LidCommit v0.2.0
Ready to configure auto-commit & desktop tray.
Visual Control. Zero Friction.
LidCommit now launches with a sleek native dark-mode GUI & System Tray application. Inspect open IDE workspaces, selectively pause auto-commits per repository, trigger on-demand syncs, and review live activity logs.
C:\Users\dev\workspace\auth-gateway
C:\Users\dev\workspace\backend-core
C:\Users\dev\workspace\secret-vault-engine
Configure "When I close the lid" to "Do nothing"
To allow LidCommit to inspect your repositories, stage changes, query Gemini/Ollama, and push to GitHub while the lid is shut, Windows must not abruptly sever the network card and sleep the CPU mid-push.
control, and press Enter.See how LidCommit crafts commit messages
Select a project scenario below to observe how the local diff is transformed into a clean commit.
diff --git a/src/middleware/auth.rs b/src/middleware/auth.rs+ pub async fn verify_jwt(token: &str) -> Result<Claims, AuthError> {+ let validation = Validation::new(Algorithm::HS256);+ decode::<Claims>(token, &DECODING_KEY, &validation)+ .map(|data| data.claims)+ .map_err(|_| AuthError::InvalidToken)+ }- // TODO: implement real expiration check+ if claims.exp < Utc::now().timestamp() {+ return Err(AuthError::SessionExpired);+ }
git add -Aorigin/feat/jwt-tokensHow LidCommit works under the hood
A frictionless zero-click automation that turns your physical laptop lid motion into git commits.
Native Hardware Event
Listens to OS-level lid close broadcasts (WM_POWERBROADCAST, IOKit, or logind D-Bus). No background battery drain.
IDE & Git Discovery
Scans open IDE processes (VS Code, Cursor, JetBrains, active terminals) and identifies every dirty working tree with uncommitted modifications.
AI Diff Synthesis
Extracts your staged & unstaged diff and prompts Gemini (or local Ollama) to draft an informative conventional commit summary.
Auto Commit & Push
Safely commits and pushes to your current active branch, and triggers an OS notification so you know your work is secured in the cloud.
Choose How Your Commits Are Generated
Configure your preferred provider in the desktop app with one click. When one is active, the others are safely deactivated, and configurations take effect instantly without restarting.
Model: gemini-2.0-flash • Hot-reloads in config.toml on save.
Engineered so it never breaks your git history
Auto-committers can feel risky without strict boundaries. LidCommit includes comprehensive safety guards that guarantee safe operation.
Clean Working Tree Check
If no files are modified, deleted, or staged, LidCommit silently skips the repo. Zero empty commits created.
50+ Files Guard
Forgot to add node_modules or target/ to .gitignore? Any diff above 50 files is automatically skipped to prevent accidental bloat.
Merge Conflict Immunity
If your repo is currently resolving a merge conflict or interactive rebase, LidCommit aborts immediately to protect your conflict markers.
Remote Verification
Only pushes if a valid git remote URL is configured upstream. If you are working on a pure local sandbox, it protects your setup.
Custom Excluded Paths
Add sensitive repositories, secret vaults, or experimental directories to your config.toml to permanently blacklist them.
Loop Prevention & Alerts
Integrated debounce monitors prevent duplicate runs and verify that notifications fire accurately once per lid cycle.
Configurable down to every detail
Tweak AI models, customize file limits, ignore sensitive directories, or switch seamlessly to 100% offline local LLMs.
# ~/.config/lid-commit/config.toml
# Or %APPDATA%\lid-commit\config.toml on Windows
[ai]
# Options: "gemini" | "openai" | "ollama"
provider = "gemini"
model = "gemini-2.0-flash"
# For local offline Ollama:
# provider = "ollama"
# model = "llama3.2"
# endpoint = "http://localhost:11434"
[safety]
# Skip project if more than 50 files changed (avoids committing node_modules)
max_files_threshold = 50
# Require git remote to be present before attempting sync
require_remote = true
# Never commit if git merge conflicts are present
abort_on_merge_conflict = true
[filters]
# Directories to completely ignore from auto-commits
excluded_paths = [
"C:\\Users\\anshu\\work\\secret-vault",
"~/experiments/throwaway-test"
]
[notifications]
# Send native desktop toast notifications on completion
enabled = true
sound = false
Don't want your diff leaving your machine? Point provider to ollama with llama3.2 or codellama for air-gapped, zero-cost AI commit generation.
If an unintended folder without a .gitignore has 500 files changed, LidCommit instantly halts and ignores it, keeping your GitHub repos safe from bloat.
Commit branch matches your active branch automatically. When you open your desktop at home or your other laptop, a quick git pull resumes your workflow effortlessly.
Minimal footprint. Maximum reliability.
Modular Rust code structure built for stability, zero panics, and effortless cross-platform support.
src/ ├── main.rs — Daemon entry point, event loop & manual sync handlers ├── gui.rs — Native desktop window, system tray, and IPC controller ├── dashboard.html — Modern dark-mode dashboard UI & frontend logic ├── config.rs — TOML config parser, serializer & fallback defaults ├── lid_monitor/mod.rs — Native OS lid close listener │ ├── Windows: WM_POWERBROADCAST + GUID_LIDSWITCH_STATE_CHANGE │ ├── macOS: IOKit kIOMessageSystemWillSleep hook │ └── Linux: logind D-Bus PrepareForSleep signal ├── ide_scanner/mod.rs — Detects active VS Code, JetBrains, Cursor & terminal git roots ├── git/mod.rs — git status, diff parser, stage, commit & push engine ├── ai/mod.rs — Multi-provider interface (Gemini / OpenAI / Ollama + Fallback) └── notifier.rs — Cross-platform native OS notifications & wake-up dialogs
Built with Passion.
Engineered for Open Source.
LidCommit follows standard open-source governance modeled after Next.js and shadcn/ui. Explore our standardized PR workflow, conventional commit guidelines, issue templates, and intellectual property policies.
Trunk-Based Git Workflow
We use standard trunk-based development. The main branch is always production-ready. Always branch off main for features or bugfixes.
Fork & Clone Repository
Fork to your personal GitHub account and add the upstream remote for easy syncing.
Create a Scoped Branch
Keep pull requests small and focused: feat/tray-shortcuts or fix/debounce-loop.
Run Lints & Tests
Ensure cargo clippy -- -D warnings and cargo test pass cleanly before opening your PR.
# 1. Clone your fork: git clone https://github.com/<your-user>/lid-commit.git cd lid-commit # 2. Run debug GUI: cargo run # 3. Check code formatting: cargo fmt --check cargo clippy -- -D warnings # 4. Run tests: cargo test
Stop worrying about manual commits before you leave.
Close your laptop, walk out the door, and pull down your work on your next device. Start using LidCommit today.