opencode-graphify-init
v0.1.7
Published
Consent-aware OpenCode plugin that refreshes Graphify graphs in the background.
Maintainers
Readme
OpenCode Graphify Init
Keep Graphify code graphs fresh in the background. First indexing requires /graphify-index consent; authorized older graphs are automatically reconstructed once under the code-only policy.
Install
Requires OpenCode >=1.17.15 <2 and Graphify 0.9.32 with MCP support:
uv tool install "graphifyy[mcp]==0.9.32"
opencode plugin opencode-graphify-init --globalRestart OpenCode, open a concrete project, then run:
/graphify-indexConfirm the repository set and authorize local, free code-only indexing. Project documentation is not indexed or deleted; source comments and docstrings remain available to Graphify.
Use
- Run
/graphify-indexand confirm the target repositories before their first indexing. - Let later OpenCode sessions reconstruct legacy graphs once and refresh stale code graphs automatically.
Consent and successful code-only policy state are recorded under .ai/graphify-out/. Historical mode/backend settings cannot enable documentation extraction.
Behavior
| Project state | Result |
| --- | --- |
| No authorized graph or consent | Show one hint; start nothing |
| Previously authorized graph without successful policy proof | Rebuild once from clean generated state, even when current at HEAD |
| Graph commit differs from Git HEAD | Refresh incrementally with --code-only |
| Graph/empty corpus is current | Keep local state; retry pending global work when enabled |
Refreshes run in the background, use exclusive local and global locks, and keep project state under .ai/graphify-out/. Interrupted or uncertain work retains its lock until an operator confirms quiescence and removes only that lock. Global reconciliation is separately pending on opt-out or failure; the plugin verifies ownership before a scoped global mutation. See Graph lifecycle for manual recovery and external-CLI race limitations.
Configure
| Variable | Effect |
| --- | --- |
| OPENCODE_GRAPHIFY_AUTOINIT=0 | Disable refresh for this OpenCode process |
| OPENCODE_GRAPHIFY_GLOBAL=0 | Leave shared global data untouched; retry pending reconciliation when enabled |
| GRAPHIFY_OUT=.ai/graphify-out | Keep Graphify CLI and MCP paths aligned |
Use GRAPHIFY_OUT=.ai/graphify-out in shells and Graphify MCP configuration. Do not combine it with --out.
Update or remove
A bare opencode-graphify-init entry follows npm latest. To pin a release:
opencode plugin opencode-graphify-init@<version> --global --forceTo remove the plugin, delete only its matching string or tuple from the global opencode.jsonc or opencode.json, preserve every other entry, and restart OpenCode. There is no global npm installation to uninstall. Existing graph data remains until you remove it separately.
Develop
pnpm install --frozen-lockfile
pnpm run check
pnpm run security:checkSee Contributing for local loading and review rules.
