Universal email backup and migration tool with an interactive cyberpunk TUI
Fast and secure email backup tool supporting Gmail, JMAP (Fastmail), IMAP servers, and multiple export formats. Features both CLI and an interactive cyberpunk-themed TUI.
Cyberpunk-themed TUI with neon colors
Real-time backup progress tracking
- 🎨 Interactive TUI - Cyberpunk-themed terminal interface with neon colors
- 📦 Multiple Formats - Export to MBOX, EML, and JSON
- 🔐 Secure - OAuth2 for Gmail, encrypted credential storage
- 🚀 Fast - Built with Bun for maximum performance
- 🔗 JMAP Support - Modern email protocol for Fastmail and compatible servers
- 📁 Flexible - Backup to local storage, home directory, or custom paths
- 🔄 Migration - Transfer emails between different accounts
- 💾 Zero Dependencies - Uses Bun's built-in features
# Using npm
npm install -g mailbak
# Using bun (recommended)
bun install -g mailbak
# From source
git clone https://github.com/codingstark-dev/backupmail
cd backupmail
bun installSimply run mailbak to launch the cyberpunk TUI:
mailbakNavigate with arrow keys and enjoy the cyberpunk interface!
Use with arguments to enter CLI mode:
# Show help
mailbak --help
# Show version
mailbak --version
# Add account
mailbak auth add
# List accounts
mailbak auth list
# Backup emails
mailbak backup <accountId> --format mbox --output ./backups
# Migrate between accounts
mailbak migrate <fromAccountId> <toAccountId>- ASCII art logo with neon glow effects
- Real-time backup progress tracking
- Multiple export location options (current dir, home dir, custom path)
- Format selection wizard (MBOX, EML, JSON)
- Cyberpunk color scheme (neon cyan, magenta, green)
↑/↓- Navigate menusEnter- Select optionEsc- Go backq- Quit
Standard Unix mailbox format
- Compatible with: Thunderbird, Apple Mail, Gmail import
Individual email files
- Compatible with: Outlook, Windows Mail
Structured metadata
- Use case: Data analysis, custom processing
Config stored in ~/.mailbak/:
~/.mailbak/
├── config.json
└── credentials/
- ✅ Gmail (OAuth2)
- ✅ JMAP (Fastmail and any JMAP-compliant server)
- ✅ Generic IMAP
- ✅ SpaceMail
- ✅ Any IMAP-compatible service
JMAP is the modern, open standard for email access (RFC 8620, RFC 8621). It's faster and more efficient than IMAP, especially for mobile and web applications.
Supported JMAP providers:
- Fastmail (pre-configured)
- Any JMAP-compliant server (custom URL)
# Add a JMAP account via CLI
mailbak auth add
# Select "JMAP (Fastmail, etc.)"
# Or use the TUI
mailbak
# Navigate to "Add Account" → "JMAP (Fastmail, etc.)"# Install dependencies
bun install
# Run in TUI mode (default)
bun run dev
# Run with CLI arguments
bun run dev -- --help
bun run dev -- auth list
# Build
bun run build
# Test
bun testContributions welcome! Please:
- Fork the repository
- Create feature branch
- Add tests
- Submit pull request
MIT © codingstark-dev