Use cases
Share knowledge with teammates
Export bug fix patterns, architectural decisions, or platform-specific learnings and share the JSON file with your team.
Back up memory sets
Export observations about a specific project or topic before migrating machines or resetting your database.
Import community exports
Import observations contributed by others — Windows compatibility fixes, deployment patterns, and more.
Cross-machine sync
Export observations from one machine and import them on another to continue where you left off.
Data directory
All Claude Mem data lives in~/.claude-mem/:
Exporting memories
The export script searches the database using hybrid search (ChromaDB vector embeddings combined with SQLite FTS5 full-text search) and exports all matching observations, sessions, summaries, and prompts to a portable JSON file.<query>— search query (uses hybrid semantic + full-text search)<output-file>— output JSON file path--project=name— optional: filter to a specific project
Importing memories
The import script reads an export file and inserts records with automatic duplicate prevention. It checks whether each record already exists before inserting, skips duplicates silently, and imports everything inside a single transaction.<input-file>— path to an export JSON file
Re-importing the same file
Running the import script twice on the same file is safe — duplicates are skipped automatically:Duplicate detection strategy
Export file format
Safety features
Duplicate prevention
Won’t re-import records that already exist in the database.
Transactional imports
All-or-nothing: if the import fails mid-way, the database is rolled back to its previous state.
Read-only export
The export script opens the database in read-only mode and never modifies data.
Dependency ordering
Sessions are imported before observations and summaries to maintain referential integrity.
Advanced usage
Export by project
Export by observation type
Filter by date after export
Usejq to filter an export file by date before importing:
Combine multiple exports
Sharing with others
As an export author:- Export your memories:
- Share the JSON file via GitHub Gist, your project repository, or direct transfer.
- Document what the export contains — what query was used and who might benefit.
- Download the export file.
- Optionally inspect it:
- Import into your database:
- Verify with a search:
Example exports
These commands export useful memory sets that can be shared with others:Troubleshooting
Database not found
Database not found
Import file not found
Import file not found
Partial import failure
Partial import failure
If the import fails part-way through, the transaction is rolled back and your database remains unchanged. Fix the issue (disk space, file corruption, etc.) and run the import again.
Folder context files
Auto-generated CLAUDE.md files for directory-level context
Search tools
Query your memory database with MCP tools