Uninstalling & exporting your data
Neo runs a background daemon and stores personal memory — sessions, notes, reflections. Leaving should be exactly as clean as arriving: neo uninstall removes Neo's OS-level footprint (autostart service, channel logins, keychain secrets) and then tells you precisely what's left, in plain language, with the exact command to remove it yourself. Neo never deletes ~/.neo for you.
If you want to keep a copy of your data first, run neo export --all before uninstalling — see Exporting your data below.
neo uninstall
neo uninstall --dry-run # print the full plan; change nothing
neo uninstall # interactive: prompts before each destructive step
neo uninstall --yes # non-interactive: confirm every step up frontWhat it does, in order:
- Removes the daemon autostart service — the same systemd user unit / launchd LaunchAgent / Windows scheduled task
neo daemon uninstallalready removes (see daemon.md). A daemon that's currently running keeps running until youneo daemon stop; only the autostart registration is removed. - Offers to log out of configured channels (Telegram, WhatsApp) — removes their stored bot token / owner id, same as
neo channels logout <channel>. - Offers to wipe stored OS-keychain credentials — every entry Neo has written under its two keychain services (
neo-cli.providersfor provider API keys,neo-cli.channelsfor channel tokens), found by asking the OS keychain to enumerate them directly (not just "the keys Neo happens to know about today" — so a credential left behind by a channel/provider that no longer exists in this version still gets found and removed). - Prints what remains — every top-level directory under
~/.neo(or$NEO_HOME) with its file count and size, the exact command to delete it (rm -rf ~/.neo/Remove-Item -Recurse -Force), and how to remove the CLI itself (npm uninstall -g @nehoraihadad/neo-agent, or just delete the cloned directory for a git-clone install).
Confirmation
There is no way to blanket-accept destructive steps without saying so:
| Context | Behavior |
|---|---|
--dry-run | Prints the full plan. Nothing runs, nothing is asked. |
Interactive terminal, no --yes | Prompts y/N before each step (autostart removal, each channel logout, the keychain wipe). |
Non-interactive (no TTY), no --yes | Every destructive step is refused — the plan and residue summary still print, so scripts/CI can inspect state, but nothing changes. |
--yes | Every step runs without prompting (scripting / CI parity). |
~/.neo itself is outside all of this — no flag combination ever deletes it. That decision is yours, made with a real shell command you can see before you run it.
Exporting your data
neo export --allCopies ~/.neo/sessions, ~/.neo/memory, and ~/.neo/config (settings, provider list, MCP server list — never literal API keys; see below) into a timestamped ./neo-export-<date>/ directory in your current working directory, alongside a manifest.json describing exactly what's inside.
Not included — these stay on this machine:
- OS keychain secrets (
neo-cli.providers,neo-cli.channels) ~/.neo/.env(the plaintext secret fallback)~/.neo/auth/(provider OAuth tokens)~/.neo/mcp/oauth/(MCP server OAuth tokens)~/.neo/channels/*.db(WhatsApp/Baileys paired-device credentials)~/.neo/daemon/(host-local locks/logs/sockets — meaningless on another host)
~/.neo/config/*.json only ever holds ${ENV_VAR} placeholders for provider keys, never the keys themselves, so it's safe to bundle — but you'll still need to reconnect providers/channels/OAuth on the new machine.
Restoring
There's no separate neo import command — restoring is exactly what it sounds like: copy the exported directories into your NEO_HOME.
cp -r neo-export-<date>/sessions ~/.neo/sessions
cp -r neo-export-<date>/memory ~/.neo/memory
cp -r neo-export-<date>/config ~/.neo/config(On Windows, Copy-Item -Recurse.) This merges with any existing content at the destination — copy to a fresh NEO_HOME for a clean migration, or over an existing one to bring old sessions/memory back after neo uninstall.
See also
- The Matrix Daemon — what the autostart service is and does.
- Channels —
neo channels login/logout, credential storage. - Environment variables —
NEO_HOMEand friends.