Repository navigation
feat(opencode): add codev codegraph enable/disable for standalone installs - #128
Merged
Merged
Conversation
quickbeard
force-pushed
the
codegraph-command
branch
from
July 28, 2026 05:21
f17663b to
26bcb2c
Compare
…talls CoDev Hub wires the CodeGraph MCP server for its managed installs, but a standalone codev install has nothing to do that wiring. `codev codegraph enable` closes the gap: it makes the `codegraph` binary resolvable (installing @colbymchenry/codegraph globally via npm, then bun, when it's missing — printing the manual command when neither package manager exists), writes the MCP server entry into the global codev.json(c) with a comment-preserving jsonc edit, and offers to index the current project via `codegraph init` (--yes auto-accepts; non-interactive runs print how to do it later). `codev codegraph disable` removes the entry, dropping an emptied mcp wrapper and leaving sibling servers untouched. The entry is byte-identical to what CoDev Hub's shim and codegraph's own installer write for CoDev Code, so the writers are interchangeable — whichever runs later sees an already-correct entry and changes nothing. The write targets whichever config file already carries the entry (CoDev Hub prefers codev.jsonc), falling back to `codev mcp add`'s resolution for fresh files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
quickbeard
force-pushed
the
codegraph-command
branch
from
July 28, 2026 07:07
26bcb2c to
6582d75
Compare
quickbeard
added a commit
that referenced
this pull request
Aug 7, 2026
… PR (#169) The CodeGraph entry (#128) describes codev codegraph enable — the fork-side workaround for CodeGraph's installer not recognizing CoDev Code. That native support is now proposed upstream as colbymchenry/codegraph#1459 (custom installer targets), so codegraph install --target codev wires the same entry from the CodeGraph side. Note it on the existing entry, matching the upstream-link convention #167 used for the MiniMax prompt entry.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Standalone CoDev Code installs (not managed by CoDev Hub) had no way to get CodeGraph wired up — CoDev Hub does that wiring only for its own managed installs (codev-hub#210). This adds a fork-only
codev codegraphcommand group that closes the gap.codev codegraph enablecodegraphbinary resolvable — probes PATH; when missing, installs@colbymchenry/codegraphglobally via npm, then bun; when neither package manager exists (platform-binary installs), prints the manual install command and exits 1. A zero-exit install that still leaves the binary unresolvable warns ("restart your shell") instead of failing — the wiring works once PATH is fixed.codev.json(c)with a comment-preserving jsonc edit. The write targets whichever file already carries anmcp.codegraphkey (CoDev Hub preferscodev.jsonc, so an entry there is updated in place rather than shadowed), falling back tocodev mcp add's resolution for fresh files. Idempotent — a second run reports "already configured" and leaves the file byte-identical. Malformed files are refused, never edited.codegraph init) —--yesauto-accepts, non-interactive runs skip the prompt; either way it prints how to index any project later.codev codegraph disableRemoves the entry from every config file that has it, drops an emptied
mcpwrapper, preserves sibling MCP servers, and no-ops when nothing is wired.Writer convergence
The entry is byte-identical to what CoDev Hub's shim and CodeGraph's own installer (pending custom-target support, codegraph#1459) write for CoDev Code — all three writers treat each other's work as already done, so mixing standalone and Hub-managed setups never fights.
Fork housekeeping
index.tsregistration joined the existing DIVERGENCES.md row (the command file and test are fork-only new files, untracked per policy); CHANGELOG entry under Unreleased.codegraphadded to the help-snapshot TOP_LEVEL list; snapshots regenerated.Testing
cliItharness (fakecodegraph/npmbinaries seeded on PATH; posix-gated where shell scripts are involved; the missing-binary suite self-skips on hosts that have a realcodegraphon PATH): wiring + indexing with--yes, byte-identical idempotency, jsonc comment/sibling preservation, non-interactive prompt skip, the npm-install branch, and all three disable behaviors.tsgo --noEmitclean; fulltest/clidirectory: 375 pass, 0 fail.🤖 Generated with Claude Code