Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

๐Ÿ“ง mailbak

Universal email backup and migration tool with an interactive cyberpunk TUI

npm version License: MIT

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.

๐Ÿ“ธ Screenshots

mailbak TUI - Main Menu
Cyberpunk-themed TUI with neon colors

mailbak TUI - Backup Progress
Real-time backup progress tracking

โœจ Features

  • ๐ŸŽจ 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

๐Ÿš€ Installation

# 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 install

๐Ÿ“– Usage

Interactive TUI (Default)

Simply run mailbak to launch the cyberpunk TUI:

mailbak

Navigate with arrow keys and enjoy the cyberpunk interface!

CLI Mode

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>

๐ŸŽฎ TUI Features

  • 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)

Navigation

  • โ†‘/โ†“ - Navigate menus
  • Enter - Select option
  • Esc - Go back
  • q - Quit

๐Ÿ“ฆ Supported Formats

MBOX

Standard Unix mailbox format

  • Compatible with: Thunderbird, Apple Mail, Gmail import

EML

Individual email files

  • Compatible with: Outlook, Windows Mail

JSON

Structured metadata

  • Use case: Data analysis, custom processing

๐Ÿ”ง Configuration

Config stored in ~/.mailbak/:

~/.mailbak/
โ”œโ”€โ”€ config.json
โ””โ”€โ”€ credentials/

๐ŸŒŸ Supported Providers

  • โœ… Gmail (OAuth2)
  • โœ… JMAP (Fastmail and any JMAP-compliant server)
  • โœ… Generic IMAP
  • โœ… SpaceMail
  • โœ… Any IMAP-compatible service

JMAP Support

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.)"

๐Ÿ’ป Development

# 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 test

๐Ÿค Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create feature branch
  3. Add tests
  4. Submit pull request

๐Ÿ“„ License

MIT ยฉ codingstark-dev

๐Ÿ”— Links


Made with โค๏ธ using Bun and OpenTUI

About

Universal email backup and migration TUI & CLI tool for Gmail, SpaceMail, and IMAP servers - Built with Bun!

Topics

Resources

Stars

15 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle ใซใ‚ˆใฃใฆๅค‰ๆ›ใ•ใ‚ŒใŸใƒšใƒผใ‚ธ (->ใ‚ชใƒชใ‚ธใƒŠใƒซ) /