2.6 KiB
Installation Guide
Prerequisites
- OpenCode 1.0.0 or higher
- Node.js 18+ with npm
Quick Install
Option 1: Install from npm (Recommended)
npm install -g opencode-working-memory
Then add to your ~/.config/opencode/opencode.json:
{
"plugin": ["opencode-working-memory"]
}
Restart OpenCode. Done.
Option 2: Install from GitHub
npm install -g github:sdwolf4103/opencode-working-memory
Then add to ~/.config/opencode/opencode.json:
{
"plugin": ["opencode-working-memory"]
}
Option 3: Local Development Install
Clone the repository:
git clone https://github.com/sdwolf4103/opencode-working-memory.git
cd opencode-working-memory
npm install
npm link
Then reference it in ~/.config/opencode/opencode.json:
{
"plugin": ["opencode-working-memory"]
}
Verification
After installation, start an OpenCode session and run:
core_memory_update goal "Test installation"
You should see a success message. Check .opencode/memory-core/ in your project directory for the session file.
Configuration
The plugin works out-of-the-box with sensible defaults. For advanced configuration, see configuration.md.
Troubleshooting
Plugin Not Loading
Symptom: No core_memory_update tool available
Solution:
- Check
~/.config/opencode/opencode.jsonincludes"opencode-working-memory"in"plugin": []array - Verify
npm install -g opencode-working-memorycompleted successfully - Restart OpenCode session
Memory Files Not Created
Symptom: No .opencode/memory-core/ or .opencode/memory-working/ directories
Solution:
- Ensure OpenCode has write permissions in project directory
- Check plugin hooks are registered (look for "Working Memory Plugin" in session logs)
- Trigger memory operations (e.g., use
core_memory_updatetool)
Type Errors During Development
Symptom: TypeScript errors when modifying plugin
Solution:
- Ensure
@opencode-ai/pluginis installed:npm install @opencode-ai/plugin - Run type checking:
npm run typecheck - See AGENTS.md for code style guidelines
Uninstallation
npm uninstall -g opencode-working-memory
Remove "opencode-working-memory" from ~/.config/opencode/opencode.json. Memory files in .opencode/memory-* will persist unless manually deleted.
Next Steps
- Read Architecture Documentation to understand how memory tiers work
- See Configuration Guide for customization options
- Check AGENTS.md for development guidelines