msgvault

go
mit

A tool to archive a lifetime of email with analytics and search in milliseconds, entirely offline.

image preview of msgvault

msgvault is a terminal email archive tool for Gmail and mail exports, with a TUI for browsing your email archive offline in the terminal.

 

It syncs using Gmail via OAuth, saves full messages, labels, and attachments, and it imports MBOX archives or Apple Mail folders. Search runs locally with Gmail-style filters like from:, subject:, label:, has:attachment, and date ranges. It also can show basic analytics like top senders, domains, and label counts.

 

Other features of msgvault include an interactive TUI,  multi-account archives in one vault, storing attachments once with content hashes, staged deletion that only removes mail from Gmail when you run the delete command, plus optional local web and MCP servers for scripts or AI assistants.

 

This tool works well for anyone with years of email who may want to move away from Gmail, those who need an email backup into an archive with attachments, and if you want your email archive easily searchable offline in a fast terminal UI.

Get Updates On Terminal Trove.

No spam, just updates on Terminal Trove. See an example update.