@xesrevinu/opencode-jj-enforcer
v0.1.2
Published
OpenCode plugin that enforces jj over git when a workspace contains a .jj repository.
Maintainers
Readme
@xesrevinu/opencode-jj-enforcer
OpenCode plugin that blocks git usage inside Jujutsu workspaces and forces agents onto jj.
Highlights
- inspects
bashtool calls before execution instead of relying on post-hoc review - detects
.jjroots from the workspace,git -C, andcd ... && git ...command patterns - blocks wrapper forms such as
rtk git ...so rewrite plugins cannot bypass the policy - stays repository local with no external service or daemon requirements
- ships as a small npm package that can also be copied directly into
.opencode/plugin
Install
Use the published package from opencode.jsonc:
{
"plugin": ["@xesrevinu/opencode-jj-enforcer@latest"],
}Restart OpenCode after updating the plugin list.
If you want to iterate from a checkout instead of npm:
mkdir -p .opencode/plugin
cp plugin/jj-enforcer.ts .opencode/plugin/jj-enforcer.tsUsage
The plugin checks the current workspace plus directories referenced inside the shell command. If any of them belong to a Jujutsu repository, the command is rejected and the agent is told to use jj.
Examples that are blocked inside a .jj workspace:
git status
git -C ../repo log
cd ../repo && git diff
rtk git logDevelopment
The repository uses Bun for dependency management and local commands.
bun install
bun run checkRelease
This package uses Changesets plus the shared GitHub Actions release workflow.
bun run changeset
bun run version-packages
bun run releaseLicense
MIT
