description: "Apothem harness adapter for OpenCode (Beta)."¶
OpenCode¶
Vendor: OpenCode
Install name: opencode
Status: Beta
Native config: ~/.config/opencode/
Installation¶
apothem install --harness opencode
The adapter writes OpenCode config and rule files from the shared profile.
Files written: config.json, rules/
Profile-to-native-config mapping¶
The adapter reads the shared apothem profile (the installed source tree
under src/apothem/, plus the root CLAUDE.md and settings*.json)
and derives the OpenCode-native config on every apothem install or
apothem update run.
The shared profile is the single source of truth; never edit native config
directly as your edits will be overwritten on the next sync.
Compatibility notes¶
Beta adapter. Hook translation covers PreToolUse and PostToolUse only.
File an issue at the apothem repository if you encounter translation gaps.
Verification¶
apothem verify --harness opencode
The verify command confirms that:
- The native config exists at the expected path.
- All mandatory fields from the shared profile are present.
- The adapter version matches the installed apothem version.
Updating¶
apothem update --harness opencode
Re-derives the native config from the current shared profile state.
Run after any change to CLAUDE.md, src/apothem/rules/,
or settings.json in the apothem source tree.
Uninstalling¶
apothem uninstall --harness opencode
Removes the native config files written by the adapter. The shared apothem profile (the source tree) is unaffected.
Conformity gate¶
python src/apothem/conformity/conformity-gate.py --harness opencode
Troubleshooting¶
| Symptom | Fix |
|---|---|
| Config file not found | Re-run apothem install --harness opencode |
| Adapter version mismatch | Run apothem update --harness opencode |
| Unexpected config content | Check the apothem source tree (src/apothem/, CLAUDE.md, settings*.json) — that is the source of truth |
Configuration knobs¶
| Flag | Default | Description |
|---|---|---|
--dry-run |
false |
Preview install without writing files. |