README file from
GithubOpenCode Links Graph
OpenCode Links Graph is an Obsidian plugin that makes raw OpenCode references visible as edges in Obsidian's native graph view.
It is designed for vaults that use OpenCode-style references as the canonical link syntax:
@.opencode/knowledge/README.md
@.opencode/agents/manager.md
What It Does
- Scans Markdown files for raw OpenCode links.
- Resolves each
@.opencode/...mdtarget to a real vault file. - Adds synthetic entries to Obsidian's resolved-link metadata.
- The native Graph and Local Graph can then render those relationships as if they were ordinary internal links.
- Does not rewrite your Markdown files.
What It Does Not Do
- It does not convert OpenCode links into Markdown links or wikilinks.
- It does not change file contents.
- It does not create missing target files.
- It does not currently add hover previews or editor decorations.
Why Synthetic Metadata?
Obsidian's native graph only reads links that Obsidian's metadata cache recognizes. Raw custom text like @.opencode/... is not a native Markdown link, so the graph ignores it.
This plugin bridges that gap by adding resolved-link metadata at runtime. The source files remain OpenCode-native; Obsidian sees graph edges.
Installation For Development
- Clone or copy this folder into an Obsidian vault under
.obsidian/plugins/opencode-links-graph/. - Install dependencies:
npm install
- Build:
npm run build
- Enable the plugin in Obsidian settings.
For active development:
npm run dev
Settings
| Setting | Default | Purpose |
|---|---|---|
| OpenCode link regex | See default settings | Pattern used to find OpenCode links. Default: @.opencode/...md. |
| Refresh delay | 400 |
Debounce after vault/metadata changes. |
| Show notices | false |
Show indexed-edge count after automatic refreshes. Manual refresh always shows a notice. |
| Debug logging | false |
Print details to the developer console. |
Limitations
- This plugin uses Obsidian's internal
metadataCache.resolvedLinksshape. That shape is widely used by plugins but is not a formal public API, so future Obsidian versions may require updates. - Existing native Markdown or wikilink edges are preserved. Synthetic OpenCode edges are removed on plugin unload.
- The plugin only creates graph edges for targets that already exist as files in the vault.
- Links to headings or block IDs are not supported in the first version.
Release Checklist
- Update
manifest.jsonversion. - Run
npm version <version>or updatepackage.jsonmanually. - Run
npm run versionto updateversions.json. - Run
npm run build. - Publish
manifest.json,main.js, andstyles.cssif present.
License
MIT