A macOS menu bar app that keeps an eye on your git projects and commits them with AI-written messages, in one click. Messages come from your local Claude Code CLI (claude), your local OpenCode CLI (opencode), or from opencommit (oco): pick one from the ✨ menu at the bottom of the panel.
Commit as often as you like with a quick WIP, then let Magic Commit turn every WIP commit into a real, descriptive message before you push.
Website: magic-commit.nicolas-dmg.fr
Each project in the panel shows its branch, changed files, WIP commits and ahead/behind counts, plus the actions that make sense right now:
- Commit: stages everything (unless you've already staged something) and commits with a generated message.
- WIP: makes an instant commit with the message
WIP, with no AI call. - Batch oco: gives each unpushed WIP commit a real message generated from that commit's own diff. Other commits keep their messages, empty WIP commits are dropped, and original author dates are kept.
- Push: runs
git push(orgit push -u <remote> <branch>for a new branch). It warns you first if WIP commits are still in there.
Worktrees are picked up automatically: every linked worktree of a project you've added shows under it, labelled with its branch, with the same buttons. Worktrees appear and disappear as you create and remove them, and clean ones fold behind a "clean worktrees" toggle. Adding a worktree's folder adds its repository instead. A clean worktree can be removed from its … menu; its branch is kept.
The menu bar icon shows how many checkouts (projects and worktrees) have something to commit or push. Statuses refresh when you open the panel, every 60 seconds, and after your Mac wakes.
-
macOS 14 Sonoma or later
-
One message generator:
-
Claude Code: the
claudeCLI, signed in once by runningclaudein a terminal. Magic Commit sends the staged diff and your recent commit subjects toclaude -p(Haiku by default, with no tools enabled) and commits the reply, matching your repository's commit style. To use another model:defaults write io.github.dommangetnicolas.MagicCommit claudeModel sonnet
-
OpenCode: the
opencodeCLI, with a provider connected once by runningopencode auth loginin a terminal. Magic Commit sends the same input toopencode run(your OpenCode default model, in an archived session; permission requests are rejected) and commits the final reply. To pick a model (provider/model):defaults write io.github.dommangetnicolas.MagicCommit opencodeModel anthropic/claude-haiku-4-5
-
opencommit: installed and configured:
npm install -g opencommit oco config set OCO_API_KEY=<your key>
Magic Commit reads your
PATHfrom your login shell, so tools installed through nvm, Homebrew or similar are found. -
-
Download
MagicCommit.zipfrom the latest release and unzip it. -
Move Magic Commit.app to
/Applications. -
The app isn't notarized by Apple, so macOS blocks the first launch. Either right-click the app and choose Open, or run:
xattr -dr com.apple.quarantine "/Applications/Magic Commit.app"
Requires Xcode 15.3+ (or a Swift 5.10+ toolchain).
git clone https://github.com/dommangetnicolas/magic-commit.git
cd magic-commit
./scripts/build-app.sh --installRun ./scripts/build-app.sh --help for all options.
- Click the wand icon in the menu bar, then + to add one or more git repositories.
- Use the buttons on each project row to commit, WIP, batch-rename or push.
- Use the
…menu (or right-click a row) to open the project in Finder or Terminal, refresh it, or remove it. - Turn on Launch at login in the panel's footer to keep it running.
Batch oco can also run without the UI:
"/Applications/Magic Commit.app/Contents/MacOS/MagicCommit" batch-oco ~/path/to/repo --generator claude--generator is claude, opencode or oco; without it, the generator picked in the menu is used.
Rewriting history is risky, so Batch oco is careful:
- It takes the commits from the oldest unpushed WIP commit up to
HEADand replays them in a temporarygit worktree. - Each WIP commit is re-staged there and the generator (
claude,opencodeoroco) writes its message. Other commits are re-committed unchanged. - The branch is moved to the rewritten history only if the final content is identical and
HEADhasn't moved in the meantime.
Your working tree and staged changes are never touched. If the generator fails partway through, nothing changes. Commits that are already pushed are never rewritten, and merge commits stop the operation.
Contributions are welcome. See CONTRIBUTING.md to get set up, and the changelog for what's new.