This guide covers this repository's former name, not importing data from tickernelz/opencode-mem. The shipped runtime is now the npm codemem package; the OpenCode plugin is @codemem/opencode-plugin.
- Stop the legacy runtime before copying its database. Preserve the database and any SQLite
-waland-shmsidecars together. - Install the current runtime and configure the host:
npm install -g codemem
codemem setup --opencode-only
If you configure plugins manually, replace @kunickiaj/codemem with @codemem/opencode-plugin. If an MCP command still invokes the old runtime, use:
{
"mcp": {
"codemem": {
"type": "local",
"command": ["codemem", "mcp"],
"enabled": true
}
}
}- If needed, copy the legacy configuration into
~/.config/codemem/config.json. Review it against the current configuration reference; old Python runner settings are not installation guidance for the npm runtime. - Restart the agent host and verify:
codemem stats
codemem db raw-events-status
The default database is ~/.codemem/mem.sqlite. When it does not exist, the runtime can migrate ~/.opencode-mem.sqlite and its SQLite sidecars. If the new default already exists, the legacy database remains untouched; do not overwrite either database to combine histories. Explicit database paths are not a request to migrate the default database.
Confirm that the expected memories appear in the viewer before uninstalling the legacy tool or deleting its files. See Python-to-TypeScript migration for runtime history and database compatibility.