cli-memory-bridge is a local-first memory bridge for terminal coding agents and MCP-enabled CLIs. It imports conversation history from supported providers on your machine, stores canonical transcripts and embeddings locally, and serves that memory back through cmb commands and an MCP-compatible stdio server.
The current Rust build supports transcript import and retrieval for:
- Codex
- Claude
- Gemini
- Copilot
- Zed
- OpenCode
- Hermes
- Antigravity CLI
It also ships an npm package surface so MCP configs can launch it through:
npx -y @aminovsky/cli-memory servecmb initto detect providers and import local conversationscmb refreshto incrementally import only new or changed sourcescmb resume <hash-id>to restore a conversation transcript by stable hashcmb conv-search <query>to search imported conversation contentcmb forget <provider> <hash-id>to soft-ban a conversation from future retrievalcmb serveto expose the stdio MCP tool surfacecmb doctorandcmb statsfor diagnosticscmb install <provider>to render provider install/config bundlescmb unlink <provider>andcmb unlink --allto render provider cleanup bundlescmb uninstallto render full package removal guidance
For MCP usage and command execution through npm:
npx -y @aminovsky/cli-memory --helpOn first install, the npm package downloads a platform-specific cmb binary from the matching GitHub release for this package version and stores it under npm/vendor/<platform>/.
If you install the package globally:
npm install -g @aminovsky/cli-memory
cmb --helpcargo build --release
./target/release/cmb --helpImport local transcripts and start using retrieval:
cmb init
cmb doctor
cmb stats
cmb conv-search "run the app"Run the MCP server through npx:
npx -y @aminovsky/cli-memory serveThe npm package is designed for MCP configs that accept command plus args. The preferred launcher shape is:
{
"command": "npx",
"args": ["-y", "@aminovsky/cli-memory", "serve"]
}Render a provider-specific install bundle:
cmb install gemini
cmb install zed
cmb install codexCurrent install behavior is render-only. It prints the config/assets you should apply for that provider.
Render cleanup instructions for one provider:
cmb unlink gemini
cmb unlink zed
cmb unlink codexRender cleanup bundles for every supported provider:
cmb unlink --allunlink removes provider wiring only. It does not remove the cli-memory package or the local memory database.
Render full uninstall guidance:
cmb uninstallThe intended order is:
cmb unlink --all
npm uninstall -g @aminovsky/cli-memoryIf you only use npx -y @aminovsky/cli-memory ..., there may be no global npm package to remove.
- Codex:
~/.codex/sessions,~/.codex/session_index.jsonl - Claude:
~/.claude/projects - Gemini:
~/.gemini/tmp/*/chats/session-* - Copilot:
~/.copilot/session-state/*/events.jsonl - Zed:
~/.config/zed/conversations/*.zed.json - OpenCode:
~/.local/share/opencode/storage/session_diff/*.jsonwithopencode.dbfallback - Hermes:
~/.hermes/sessions/~/.hermes/history - Antigravity CLI:
~/.gemini/antigravity/brain/*
For npm release prep, this repo now includes:
- package metadata in package.json
- Apache 2.0 license in LICENSE
- npm bin entrypoint in npm/bin/cli-memory.js
- npm postinstall downloader in npm/install.js
- shared platform mapping in npm/platform.js
Before publishing to npm:
- build release binaries for each supported platform
- upload them to the GitHub release tagged
v<package.json version> - use asset names in the form
cmb-<version>-<platform-arch>andcmb.exe-<version>-<platform-arch>for Windows - verify with
npm pack --dry-runand a cleannpx -y @aminovsky/cli-memory --helpinstall test
This build is production-oriented but still evolving:
- transcript import and retrieval are implemented
- provider lifecycle commands are implemented
- some providers are reconstructed from artifact trails rather than full native session models
- graph/knowledge-linking is intentionally deferred
This project takes reference and inspiration from: