CLI Tools
MBOX Conversion
Convert MBOX email archives to searchable markdown
Convert MBOX email archives from Gmail, Thunderbird, or other email clients to searchable markdown files.
Usage
pnpm convert -- mbox <file> [options]Options
| Option | Default | Description |
|---|---|---|
-o, --output <dir> | ./converted/emails | Output directory |
-v, --verbose | false | Enable verbose logging |
--dry-run | false | Preview without writing |
-t, --tags <tags...> | ["email"] | Additional tags |
--skip-attachments | false | Skip attachment extraction |
Example
# Convert Gmail export
pnpm convert -- mbox ~/Downloads/All\ mail.mbox -o ./emails
# With custom tags
pnpm convert -- mbox archive.mbox -t work important
# Dry run to preview
pnpm convert -- mbox archive.mbox --dry-runOutput Format
Each email becomes a markdown file:
---
title: "Re: Project Update"
source_type: email
source_hash: "abc123..."
tags:
- email
- imported
created_at: "2024-01-15T10:30:00Z"
converted_at: "2024-03-20T14:22:00Z"
metadata:
from: "alice@example.com"
to: "bob@example.com"
cc: "team@example.com"
subject: "Re: Project Update"
message_id: "<unique-id@mail.example.com>"
in_reply_to: "<parent-id@mail.example.com>"
---
# Re: Project Update
Email body content here...Supported Sources
- Gmail: Google Takeout MBOX exports
- Thunderbird: Profile folder backups
- Apple Mail: Exported mailboxes
- Outlook: Exported MBOX files
Next Steps
- Batch Upload - Upload converted files
- Email Import Guide - Complete workflow