feat: local file storage backend — zero-cost offline alternative#40
Closed
MasterDD-L34D wants to merge 1 commit into
Closed
feat: local file storage backend — zero-cost offline alternative#40MasterDD-L34D wants to merge 1 commit into
MasterDD-L34D wants to merge 1 commit into
Conversation
Replace the Supermemory Pro API dependency with a zero-cost local file
storage engine. Memories are stored as JSON files in
~/.supermemory-claude/memories/{personal,repo}/<containerTag>/.
Changes:
- New: src/lib/local-memory-client.js — LocalMemoryClient with
addMemory(), search() (keyword + recency scoring), getProfile()
- Removed: supermemory SDK dependency from package.json
- Updated: all hooks and skills to use LocalMemoryClient instead of
SupermemoryClient — no API key or auth flow required
- Updated: settings.js to remove auth.js dependency
- Rebuilt: all 5 plugin scripts via esbuild
Search uses keyword overlap + 30-day recency decay scoring.
No semantic search but covers most use cases for session recall.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a local file-based storage backend as an alternative to the Supermemory cloud API. Users without a Pro subscription can still benefit from persistent cross-session memory using local JSON files.
What changed
src/lib/local-memory-client.js—LocalMemoryClientclass replacingSupermemoryClientaddMemory()— saves to~/.supermemory-claude/memories/{personal,repo}/<containerTag>/<uuid>.jsonsearch()— keyword overlap scoring + 30-day recency decaygetProfile()— returns recent memories as profile contextsupermemorynpm dependency (was ^4.0.0)LocalMemoryClientinstead ofSupermemoryClientsettings.js— removedauth.jsdependencyStorage layout
Why
Trade-offs vs cloud
Test results
npm run build— all 5 hooks built (48 KB total)Suggestion for maintainers
This could be offered as a fallback mode: if no API key is configured, use local storage automatically. Cloud users get the full Supermemory experience; free users get basic local persistence. Both benefit from the same plugin structure.
🤖 Generated with Claude Code