oc-plugin-gitgud
v0.1.1
Published
Lightweight Git controls for the OpenCode TUI sidebar: review your working tree, stage and unstage files, generate commit messages with an LLM, commit, and push without leaving OpenCode.
Readme
GitGud plugin for OpenCode
Lightweight Git controls for the OpenCode TUI sidebar: review your working tree, stage and unstage files, generate commit messages with an LLM, commit, and push without leaving OpenCode.
Inspired by lazygit.
Installation
Install from the CLI:
opencode plugin oc-plugin-gitgudOr from OpenCode commands:
- Press
Ctrl+P - Select
Install Plugin - Enter
oc-plugin-gitgud
Options
Plugin options can be configured via the tui.json config file.
TUI
enabled(boolean, defaulttrue)replace_sidebar_files(boolean, defaultfalse) disables OpenCode's default Modified Files sidebar cardconfirm_push(boolean, defaulttrue)confirm_stage_all_on_commit(boolean, defaulttrue)commit_agent(string, default"build")commit_model(string, optional) overrides the model for generated commit messages usingprovider/modelformat, for exampleopencode-go/kimi-k2.6commit_system_instructions(string, optional) appends extra style guidance to GitGud's default commit-message system promptkeybinds(object) overrides GitGud's OpenCode command keybinds. Set a keybind tofalse,null, an empty string, or"none"to disable it.
For example:
{
"commit_model": "openai/gpt-5.1",
"commit_system_instructions": "Prefer short conventional commits. Mention issue IDs when present."
}Default keybinds use OpenCode leader sequences to avoid common terminal, macOS, and window-manager shortcuts. Mutating actions use uppercase shifted leader chords to reduce accidental collisions with OpenCode's lowercase leader defaults:
{
"keybinds": {
"open_status": "<leader>v",
"stage_all": "<leader>A",
"unstage_all": "<leader>U",
"generate_commit_message": "<leader>p",
"commit": "<leader>C",
"push": "<leader>P",
"refresh": "f5"
}
}Commands
GitGud: Stage allGitGud: Unstage allGitGud: Open Git StatusGitGud: Generate commit messageGitGud: CommitGitGud: PushGitGud: Refresh
