Skip to content

phanen/opencode-guardian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opencode-guardian

OpenCode plugin that auto-reviews approval requests using a guardian LLM with a risk-based decision framework. Inspired by Codex's guardian.

Install

npm install && npm run build
./scripts/install.sh

The script registers the plugin via opencode plugin -g and copies commands/guardian.md to ~/.config/opencode/commands/. Idempotent. Set DRY_RUN=1 to print actions without executing.

Modes

  • user (default) - Plugin is passive. No auto-review. All approvals go to the human.
  • auto_review - Every approval request is routed to the guardian LLM, which returns allow/deny. The user is only asked for the actions the guardian chose to escalate.

Switch at runtime:

  • /guardian - toggle user <-> auto_review
  • /guardian on or /guardian auto_review - enable auto-review
  • /guardian off or /guardian user - disable
  • /guardian skip or /guardian dangerously_skip - auto-allow every approval without LLM review (escape hatch)
  • /guardian status - show current mode
  • /guardian start - emit a kickoff message (useful after enabling)

Credits

License

MIT

About

safe yolo mode for opencode

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors