Bring memory in and take it out
Export, import and move machines
Take a copy of your memory out of MemIndex, bring one in, or move everything to a new computer. An export is a plain file that you keep.
Export
Use the viewer's Export button, or run:
npx memindex export --project shop --out shop.jsonl
Exported your memory (the shop project, from this machine)
Sessions: 1
Prompts: 0
Observations: 4
Summaries: 0
File: shop.jsonl
Bring it into any MemIndex with: npx memindex import --from <file>
Leave out --project to export every project. Choose a new file name each time, because export never overwrites a file. Keep exports private: they contain your saved prompts and notes.
Import
Preview first. Nothing changes until you run it without --dry-run:
npx memindex import --from shop.jsonl --dry-run
Your existing memory (preview, nothing was changed)
From: shop.jsonl (MemIndex export, format version 1)
Sessions: 1 found, 0 to add, 1 already here
Prompts: 0 found, 0 to add, 0 already here
Observations: 4 found, 0 to add, 4 already here
Summaries: 0 found, 0 to add, 0 already here
Nothing new to bring in: MemIndex already has all of it.
Importing twice is safe, because anything already here is skipped. A real run first saves a backup of your database in the backups folder of your memory folder. --from also accepts a MemIndex memory database file.
Move to a new computer
- On the old computer, run
npx memindex stop. - Copy
memindex.db(andmemindex.db-walandmemindex.db-shmif they exist), plussettings.json,.env,transcript-watch.jsonand thecorporafolder, from your memory folder to a safe place. Treat that copy like your API keys, becausesettings.jsonand.envcan hold them. - Install MemIndex on the new computer with
npx memindex@latest install. - Run
npx memindex stopthere, put the copied files in the memory folder (~/.memindex), and runnpx memindex start. - Run
npx memindex doctorand check that the Worker daemon row shows a check mark.
Rather copy one portable file? Export on the old computer and import on the new one. The export holds your notes but not your settings.
Search by meaning rebuilds on its own from the restored notes, so it can be slightly incomplete for a short while.