Add brin to OpenCode with a PreToolUse hook. Gate shell tools and block dangerous packages before they install.
OpenCode's hooks system lets you intercept tool calls before they execute. use a PreToolUse hook to check brin before any package install command runs.
the hook reads x-brin-verdict and x-brin-score from curl response headers for a fast, lightweight check. if the verdict is suspicious or dangerous, the command is blocked. if brin is unreachable, the hook allows the command through.