@levent-kurt/opencode-git-commitZero-config background git auto-commit plugin for OpenCode CLI
1
11
2 in 7 days
22.5
Multi-signal model
4 months ago
2026-04-17
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@levent-kurt/opencode-git-commit@1.0.1"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@levent-kurt/opencode-git-commit@1.0.1"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D @levent-kurt/opencode-git-commitopencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
An OpenCode plugin that automatically commits changes when your coding session becomes idle.
What It Does
This plugin monitors your OpenCode session and automatically creates git commits when:
- The session goes idle (no active operations)
- There are uncommitted changes in your working directory
- A git repository exists (or can be initialized)
The commit message is intelligently extracted from the last assistant message in your conversation, making commits contextual and meaningful.
Features
- Automatic Commits - Commits changes whenever your session becomes idle
- Smart Commit Messages - Extracts context from your last conversation to create meaningful commit messages
- Auto-initialize - Automatically initializes a git repository if one doesn't exist
- Respects .gitignore - Git handles ignored files automatically
- Conventional Commits - Uses
feat:orfix:prefixes based on message content
Installation
Via Command Line
opencode plugin "@levent-kurt/git-autocommit@latest"
Via Configuration
Add to your .opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
"@levent-kurt/git-autocommit@latest"
]
}
Manual Installation
npm install @levent-kurt/git-autocommit
Then add to .opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
"file:///path/to/node_modules/@levent-kurt/git-autocommit/dist/index.js"
]
}
How It Works
- When a
session.idleevent is triggered, the plugin checks for git changes - If changes exist, it fetches the last assistant message from your session
- Extracts the first line, sanitizes it, and uses it as the commit message
- Stages all changes with
git add . - Commits with
--no-verifyto bypass hooks
Configuration
The plugin works out of the box with no configuration needed. Just install and it will start auto-committing.
Requirements
- OpenCode with plugin support
- Node.js (for running the plugin)
- Git installed on your system
License
MIT