opencode
Install NebGuard for opencode. First check the shared prerequisites: the nebguard binary on your PATH, and opencode 1.18.30 or newer already installed.
1. Run setup
nebguard setup opencode
Setup writes a small managed plugin to ~/.config/opencode/plugins/nebguard.js. The plugin invokes the content-addressed NebGuard binary before and after each tool call. Re-running setup is safe.
2. Verify
Launch opencode and ask it to make a harmless edit:
opencode
When NebGuard blocks an action, the plugin throws the non-empty NebGuard reason and opencode displays it as the tool error. The same tool wrapper covers foreground work and task-agent sessions at the supported version. Headless and autonomous launches need no trust-bypass flag.
Uninstall
nebguard uninstall --host opencode
Uninstall removes the managed plugin and installed binary. It refuses to remove a plugin file that is not owned by NebGuard.
Next steps
- GitHub Copilot CLI or Gemini CLI: set up another assistant.
- Examples: see what blocks and guidance look like.