@septum-jdr/private-context
v2.0.2
Published
Enterprise automatic context manager for Claude CLI with SQLite + FTS5
Maintainers
Readme
@septum-jdr/private-context
Persistent semantic memory engine for Claude CLI SQLite + FTS5 powered automatic context injection.
✨ Why This Exists
Claude CLI does not persist long-term context across executions.
@septum-jdr/private-context adds:
- Persistent memory
- Automatic context injection
- Semantic + recency ranking
- Zero manual workflow
- Fully automatic execution wrapper
No extra commands. No manual context files.
🚀 What It Does (Automatically)
Every time you run:
claude "your prompt"The wrapper:
Searches relevant historical entries
Combines:
- Semantic match (FTS5)
- Recent history
Injects context before your prompt
Executes
claude-originalStores prompt + response
Auto-prunes old records
Displays:
[private-context ACTIVE]
Completely automatic.
🧠 Search Strategy
Hybrid model:
| Strategy | Purpose | | -------------------- | --------------------------------- | | FTS5 Semantic Search | Find conceptually related entries | | Recency Ranking | Maintain session continuity | | Auto-prune | Prevent uncontrolled DB growth |
- No embeddings required.
- No external APIs.
- No recurring costs.
📦 Installation
npm install -g @septum-jdr/private-contextRequires:
- Node 18+
- Claude CLI installed
Recommended:
- Node 20 LTS
🔧 Integration With Claude
Step 1 — Backup original Claude
macOS / Linux / WSL:
mv $(which claude) $(dirname $(which claude))/claude-originalWindows PowerShell:
Rename-Item (Get-Command claude).Source claude-originalStep 2 — Activate wrapper
Add alias:
alias claude="private-context"Reload shell:
source ~/.zshrc
# or
source ~/.bashrcDone.
🖥 WSL Installation Notes
Important:
- Install Node inside WSL
- Install package inside WSL
- Backup Claude inside WSL
- Do not mix Windows Node with WSL Node
Everything must live in the same environment.
📁 Storage Location
~/.claude/private-context.dbSQLite database with FTS5 enabled.
🏗 Architecture Overview
Layered design:
- CLI Wrapper
- Core Engine
- SQLite Adapter
- Search Engine (FTS5)
- Context Injector
- Auto-prune Manager
Fully local. No network dependency. Deterministic behavior.
📊 Manual Context vs private-context
| Feature | Manual | private-context | | ------------------- | ------ | --------------- | | Persistent Memory | ❌ | ✅ | | Automatic Injection | ❌ | ✅ | | Semantic Retrieval | ❌ | ✅ | | Recency Ranking | ❌ | ✅ | | Auto-Prune | ❌ | ✅ | | Setup Complexity | Medium | Low |
🔄 Updating
npm update -g @septum-jdr/private-context❌ Uninstall
Restore original Claude:
macOS / Linux / WSL:
mv $(dirname $(which claude))/claude-original $(dirname $(which claude))/claudePowerShell:
Rename-Item claude-original claudeThen:
npm uninstall -g @septum-jdr/private-context🛡 Security
- Local-only storage
- No external APIs
- No telemetry
- No remote calls
- Fully auditable source
🧹 Auto-Prune Policy
Keeps last 500 entries automatically.
Prevents database bloat.
No manual maintenance required.
🧪 Troubleshooting
"private-context ACTIVE" not showing
- Check alias
- Confirm correct Node environment
- Verify Claude binary was backed up correctly
WSL not working
- Ensure Node and Claude are installed inside WSL
- Check
$HOMEpath consistency
📈 Roadmap
- Configurable prune strategy
- Optional embeddings mode
- Context size visualization
- Session tagging
- Multi-project indexing
🤝 Contributing
PRs welcome.
- Fork repository
- Create feature branch
- Submit PR
📜 License
MIT
👨💻 Author
@septum-jdr