Share observations between Claude Mem installations, back up specific memory sets, and import community knowledge using hybrid search export.
The export and import scripts let you move memory data between Claude Mem installations with automatic duplicate prevention. Use them to share knowledge with teammates, back up specific memory sets, or import community-contributed observations.
~/.claude-mem/├── claude-mem.db # SQLite database (observations, sessions, prompts)├── chroma/ # Vector embeddings for semantic search├── .install-version # Cached version for smart installer├── worker.port # Current worker port file└── logs/ ├── worker-out.log └── worker-error.log
The export scripts read from this database directly.
Export files contain memory data in plain text. Review exports before sharing to ensure no sensitive information — API keys, passwords, internal hostnames — is included.
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.
# Export all Windows-related memoriesnpx tsx scripts/export-memories.ts "windows" windows-memories.json# Export bug fix patternsnpx tsx scripts/export-memories.ts "bugfix" bugfixes.json# Export work on a specific featurenpx tsx scripts/export-memories.ts "progressive disclosure" pd-patterns.json
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.
# Export only memories from a specific projectnpx tsx scripts/export-memories.ts "bugfix" bugfixes.json --project=claude-mem# Export all memories for a project (empty query)npx tsx scripts/export-memories.ts "" all-project.json --project=my-app
❌ Database not found at: /Users/you/.claude-mem/claude-mem.db
Make sure Claude Mem is installed and has recorded at least one session. The database is created on first use.
Import file not found
❌ Input file not found: windows-memories.json
Check the file path. Use an absolute path if the file is not in the current directory.
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