mboxer converts raw Gmail MBOX exports into organized, structured Markdown source packs for
NotebookLM (plus JSONL for RAG). This is the friendly step-by-step walkthrough; see README.md for
the full reference and docs/ for design detail.
Every command below passes --config config/mboxer.yaml. If you omit --config, mboxer falls
back to the bundled config/mboxer.example.yaml, so you can try the tool before writing your own
config.
python -m venv .venv
source .venv/bin/activate
pip install -e .
mboxer --help- Go to Google Takeout and request an export of your Gmail data.
- Download and extract the archive, then locate the
.mboxfile.
Test with a small MBOX before ingesting large archives. Gmail exports can exceed several gigabytes. Slice a small
.mboxand ingest that first, run an export--dry-runto verify the output shape, and review the generated files locally before uploading anything to a cloud service.
cp config/mboxer.example.yaml config/mboxer.yamlEdit config/mboxer.yaml to set your limit profile, locked taxonomy, classification rules, and
security/redaction policy.
Create (or migrate) the local SQLite index that holds all durable state.
mboxer init-db --config config/mboxer.yamlmboxer keeps accounts separate. Add one before ingesting.
mboxer account add primary-gmail \
--display-name "Primary Gmail" \
--email you@example.com \
--config config/mboxer.yamlConfirm it with mboxer account list --config config/mboxer.yaml.
The path to the .mbox is a positional argument; the human-readable label is --source-name.
mboxer ingest data/mboxes/primary-gmail/sample.mbox \
--config config/mboxer.yaml \
--account primary-gmail \
--source-name "Sample" \
--extract-attachments \
--resume--resume makes ingest restartable from its last checkpoint. Add --create-account to create the
account key inline if you skipped step 2.
Assign categories, sensitivities, and export profiles deterministically. Defaults to thread level with inheritance down to messages.
mboxer classify --config config/mboxer.yaml --account primary-gmail --level threadThe classifier can propose new categories. Review counts and pending proposals, then approve or reject before they are used in exports.
mboxer review-categories --config config/mboxer.yaml --account primary-gmail
mboxer approve-category <proposal_id>
mboxer reject-category <proposal_id>Run the local regex sensitivity scan (email, phone, SSN-like, credit-card-like) and record findings.
mboxer security-scan --config config/mboxer.yaml --account primary-gmailVerify the output shape, category directories, and size splitting without writing the full output. A dry run is free and fast.
mboxer export notebooklm \
--config config/mboxer.yaml \
--account primary-gmail \
--profile ultra_safe \
--dry-runmboxer export notebooklm \
--config config/mboxer.yaml \
--account primary-gmail \
--profile ultra_safe \
--out exports/notebooklmOutput (and a manifest.csv + manifest.json) is written under exports/notebooklm/<account-key>/.
mboxer export jsonl \
--config config/mboxer.yaml \
--account primary-gmail \
--out exports/rag/messages.jsonlThe account key is inserted into the output path automatically, so this lands at
exports/rag/primary-gmail/messages.jsonl with a messages.manifest.json beside it.