How Mila did it: case studies and news
Everything you taught Mila — instructions, skills, memory, crons, settings — goes into one archive. The open code plus that archive is the same Mila on any machine. There are no passwords or keys in the archive. Every line below links to the code.
A new server or your own laptop: Mila moves with you.
mila export packs Mila into a tar.gz archive. skills/mila-export:8-9
CLAUDE.md, the constitution, memory, the diary, rituals, crons, knowledge and documents.
skills/mila-export:27 mila_export.py:183-185Core skills and your own, hooks, commands, settings.json without secrets, the plugin list with versions.
skills/mila-export:28-29 mila_export.py:204-215manifest.json: format, date, core version, every file with its sha256 checksum, and what was left out and why.
A note inside the archive: how to install the core, check the archive, and what to type in by hand.
mila_export.py:260-287Files with secret names are not taken: .env, anything with token, key, secret or password in the name, .pem, the secrets/ and .ssh/ folders. mila_export.py:23-24 skills/mila-export:34
A scanner reads every other file. If it finds something that looks like a key, the export stops and names the file and line. It does not print the key itself, and no archive is written. mila_export.py:38-47 mila_export.py:301-305
--allow exception only on the owner’s word; she does not go around the scanner herself. skills/mila-export:44The archive holds Mila, not other people’s conversations.
Session transcripts and chat cards go in only with --with-history, and Mila warns that this is other people’s data.
Incoming messages from people and the inbox and outbox folders never go in, not even with history.
mila_export.py:26 mila_export.py:229-230 test_export.sh:73Skills and memory can hold notes about clients and students. --no-people leaves out the students, clients, people and contacts folders.
Video, photos and archives only with --with-media. Files over 5 MB are not taken.
On a clean machine: install the core, check the archive, lay it out, then run mila doctor. skills/mila-export:49-52
Every file is checked against the inventory by sha256. A changed file, an extra file, a path going out through .. or a link instead of a file means a refusal, and nothing is written.
If a file already exists and differs, it stays. The archive version goes to mila-restore/<time>/conflicts/. --overwrite replaces it and keeps the old copy in replaced/.
Shows what goes where and writes nothing.
mila_export.py:398-400 test_export.sh:95The bot token, the Claude login, the Telegram plugin, service keys by name, MCP servers, then mila doctor.
“Make a copy” is the owner’s own data. Mila runs the export and reports the path, the size and the number of files. She does not send the archive to anyone but the owner. Once a month and before a core update she offers a fresh copy. skills/mila-export:42-46
The archive goes to ~/mila-backups by default, with permissions 600: only your user can read it. Every Mila has this skill: release.json lists it among the “genes”, next to updates and the mila launcher. mila_export.py:316 mila_export.py:327 release.json:73-78 install/mila:268-274
$ mila export --dry-run $ mila export --out ~/mila-backups $ mila export verify <archive> $ mila restore <archive> --dry-run $ mila restore <archive> $ mila backup run --to user@host:<dir>
These are two different tools. mila backup keeps what cannot be recovered and can send a copy to another machine. install/mila:262-267 backup.py:18-22
The code is in git, the model is at the provider. The memory is nowhere else: the inbound journal, chat cards, the access list, skills, the spend log. Backup keeps exactly that.
docs/REFERENCE.md:364-367 backup.py:41-62A key inside a file is replaced with a marker. After writing, the archive is opened again and checked; if a secret is still there, the archive is deleted.
backup.py:104-119 backup.py:320-354A copy on the same machine protects against a mistake, not against losing the machine. --to sends the archive over ssh and checks its size on the far side.
The last 7 archives locally, 30 on the other machine. Old local ones are removed only after a successful send.
backup.py:356-364 backup.py:419-431SKILL.md) the model follows. skills/mila-export mila_export.py.env and secrets/: export skips them by name. mila_export.py:23-24 mila_export.py:38-47mila backup keeps it. Backup has no restore command, only status, run and list. mila_export.py:229-230 backup.py:56-57 backup.py:18-22mila backup does not run on a schedule by itself: when it runs and where the copy goes are decided when it is set up. deploy/README.md:112-115 install/install.sh:130-131| File | What it does |
|---|---|
| skills/mila-export | export and restore, how Mila acts (in Russian, short English part) |
| mila_export.py | the archive, the secret scanner, the check, the restore |
| test_export.sh | 39 checks in a sandbox |
| install/mila | the mila export, mila restore and mila backup commands |
| install/backup.py | a daily copy: secrets cut out, a copy on another machine |
| README.md | Revive your Mila from an archive |
| release.json | genes: what every Mila carries |
| docs/REFERENCE.md | what is worth backing up |
The kit is open: skills, hooks, tools and templates. Run test_export.sh yourself; every pull request is read by a person and by Mila Quality.
Facts on this page: github.com/shakhruz/mila (main, 688ebc2, v1.5.1), checked 21 Oct 2026; test_export.sh passed 39 of 39. The chat in the phone is an illustration. “Mila”, “MILAGPT” and the logo are trademarks of MILAGPT.