Repository navigation
Releases
v1.0.1
What's Changed
- chore: homepage for npm by @AhmedIkram05 in #3
- Docs/clarity correctness by @AhmedIkram05 in #4
Full Changelog: v1.0.0...v1.0.1
v1.0.0 - first stable release
opencode-git-guard v1.0.0 - first stable release
OpenCode plugin that blocks destructive git before the bash tool runs, via tool.execute.before. Safe mutating commands (commit, push, checkout, rebase) pass through to OpenCode's permission layer untouched.
Install
{ "plugin": ["opencode-git-guard"] }Blocks
push --force / -f / --mirror / :refspec deletes, reset --hard, checkout -- ., checkout --orphan / -B, checkout/switch -f, branch -D/-M/--force, stash drop/clear, tag -d, reflog expire, gc --prune, update-ref, prune, filter-branch, filter-repo, forced worktree remove, clean -fd and friends. Chain-aware (&&, ;, |) - safe prefixes can't smuggle a destructive tail. Quoted messages (commit -m "git push --force") correctly pass through.
Escape hatch
OPENCODE_GIT_GUARD_DISABLE=1
Why 1.0.0
Block-list contract is stable from here: new patterns are minor, removals are major. Ships with CI (npm test gate), tag-driven publish with npm provenance, and one-click release bump (patch/minor/major).
Full Changelog: v0.1.2...v1.0.0