An OpenCode plugin that brings Ix Memory's graph-first reasoning into OpenCode as a native cognitive layer.
OpenCode + Ix = reasoning engine + persistent code knowledge graph. Skills are cognitive abstractions — not CLI wrappers — that start with cheap graph signals before reading source, and stop early when the question is answered.
- OpenCode installed
- Ix Memory CLI (
ix) installed and connected to a workspace - Bun installed — required (every
ixcall goes throughBun.spawn; Node.js is not supported)
curl -fsSL https://raw.githubusercontent.com/ix-infrastructure/ix-opencode-plugin/main/install.sh | bashInstalls globally into ~/.config/opencode/ — active in every OpenCode session automatically.
Install flags:
# Update: re-run the install command. The installer replaces the files it # installed before (it lists them in ix-opencode-plugin/install-manifest.txt). # If a file it would write already exists and is not one of its own, it stops # without changing anything. --force replaces those files too, and only those. # It writes only into real directories, never through a symlinked one. curl -fsSL https://raw.githubusercontent.com/ix-infrastructure/ix-opencode-plugin/main/install.sh | bash -s -- --force # Per-project install — copies plugin files into .opencode/ in the current directory # instead of the global ~/.config/opencode/. Useful for team repos where you want # the plugin checked in or scoped to a single project. curl -fsSL https://raw.githubusercontent.com/ix-infrastructure/ix-opencode-plugin/main/install.sh | bash -s -- --project # Per-project install into a specific directory curl -fsSL https://raw.githubusercontent.com/ix-infrastructure/ix-opencode-plugin/main/install.sh | bash -s -- --project /path/to/myproject # Dry run — prints exactly what the installer would do without making any changes. # Good for verifying the install path and config merges before committing. curl -fsSL https://raw.githubusercontent.com/ix-infrastructure/ix-opencode-plugin/main/install.sh | bash -s -- --dry-run # Uninstall: removes exactly the files the install manifest lists, the # directories the installer created (if they are empty), and the plugin's # entries in opencode.json. Your own commands, agents and config stay. # Add --project [dir] to uninstall a per-project install. curl -fsSL https://raw.githubusercontent.com/ix-infrastructure/ix-opencode-plugin/main/install.sh | bash -s -- --uninstall # Use an existing local clone instead of downloading from GitHub. # Useful for development or offline environments. ./install.sh --source /path/to/ix-opencode-plugin
Flags can be combined — for example, --force --dry-run previews what a force re-install would do without changing anything.
Earlier releases copied the plugin straight into .opencode/: plugins/ix-plugin.ts, runtime/, commands/ix-*.md, agents/ix-*.json and AGENTS.md. Those copies have no manifest, so the installer recognises one as its own only when it is byte-identical to the file this version ships. Re-running install.sh --project (or install.ps1 -Project) then:
- takes over identical
commands/andagents/files, and stops before changing anything if any differ (an older version, or your own edits). Re-run with--forceto replace exactly those files. - removes the old
plugins/ix-plugin.tstogether with itsruntime/files when the entry point is identical. If the old entry point differs, all of them stay, because OpenCode loads every file in.opencode/plugins/and the old entry point still importsruntime/. The installer then prints the files to delete by hand, starting with.opencode/plugins/ix-plugin.ts. - removes an identical
.opencode/AGENTS.md, and itsopencode.jsonentry with it.
--uninstall --project applies the same rules to the old copies.
irm https://raw.githubusercontent.com/ix-infrastructure/ix-opencode-plugin/main/install.ps1 | iex
Installs globally into %APPDATA%\opencode\ — active in every OpenCode session automatically.
Flags:
# Per-project install in current directory .\install.ps1 -Project # Per-project install in a specific directory .\install.ps1 -Project C:\path\to\myproject # Force re-install .\install.ps1 -Force # Preview without making changes .\install.ps1 -DryRun # Uninstall .\install.ps1 -Uninstall # Use an existing local clone .\install.ps1 -Source C:\path\to\ix-opencode-plugin
Note: If you see a script execution policy error, run
Set-ExecutionPolicy RemoteSigned -Scope CurrentUserfirst.
Use the macOS/Linux install command above inside your WSL terminal.
Open OpenCode and run:
Use the ix-health tool
Expected output: Status: OK · CLI: ix x.x.x installed · Graph: indexed
If the graph isn't built yet, run ix map first.
See QUICKSTART.md for full setup details.
Eight slash commands with phased reasoning — graph first, source reads only when needed.
| Command | What it does |
|---|---|
/ix-understand [target] |
Build a mental model of a system or the whole repo |
/ix-investigate <symbol> |
Deep dive: role, connections, execution path |
/ix-impact <target> |
Change risk: blast radius, affected systems, test targets |
/ix-plan <targets...> |
Risk-ordered implementation plan |
/ix-debug <symptom> |
Root cause analysis from symptom to candidates |
/ix-architecture [scope] |
Design health: coupling, smells, hotspots |
/ix-docs <target> [--full] |
Generate narrative-first system documentation |
/ix-help [question] |
Route to the right skill or tool |
| Agent | Purpose |
|---|---|
ix-explorer |
General-purpose graph exploration, open-ended questions |
ix-system-explorer |
Full architectural model of a codebase or region |
ix-bug-investigator |
Autonomous investigation from symptom to root cause candidates |
ix-safe-refactor-planner |
Blast radius + safe change sequencing for refactors |
ix-architecture-auditor |
Full structural health report with ranked improvements |
17 TypeScript tools OpenCode can call during any task.
| Tool | Purpose |
|---|---|
ix-query |
Graph entity lookup by name (locate + explain) |
ix-neighbors |
Callers, callees, imports, depends traversal |
ix-impact |
Blast radius and risk verdict |
ix-map |
Architectural overview with subsystem table |
ix-ingest |
Graph status and refresh trigger |
ix-history |
Revision, decisions, bugs (Ix Pro) |
ix-docs-tool |
Condensed context summary for injection |
ix-locate |
Text/pattern search across the codebase |
ix-explain |
Full symbol explanation with role and importance |
ix-rank |
Top symbols by dependents, callers, or members |
ix-stats |
Graph-wide statistics and health |
ix-subsystems |
Subsystem listing with hierarchy and signals |
ix-inventory |
Enumerate files or symbols in a path scope |
ix-trace |
Full execution path trace (upstream + downstream) |
ix-decide |
Pre-edit policy verdict (ALLOW / REVIEW / BLOCK) |
ix-health |
CLI and graph availability check |
ix-smells |
Architecture smell detection |
All tools call the ix CLI, with a timeout on every call.
| Trigger | Hook | Effect |
|---|---|---|
| Any session | AGENTS.md injection |
Always-on graph-first guidance |
| After file edit | tool.execute.after |
Guarded, debounced ix map of the repo root, in the background |
The hook never blocks an action. A stale architecture map is reported by the ix-* tools themselves, from the map_stale signal Ix prints, not by a hook. There is no pre-edit gate: ix-decide is a tool the agent calls, not a hook. The plugin runs no ix command at startup.
- QUICKSTART.md — step-by-step first use guide
- ARCHITECTURE.md — design decisions and component overview
- TOOL_CONTRACT.md — tool API reference and output format
- ROADMAP.md — task log of the 1.0 overhaul (historical)