---
title: "mboxShell — the open-source terminal MBOX viewer — Mbox Viewer"
description: "Free, open-source (MIT) terminal app written in Rust to open, search and export MBOX files of any size — including Gmail Takeout backups over 50 GB."
url: https://mboxviewerpro.com/mboxshell/
language: en
source: Mbox Viewer
---

# mboxShell

The free terminal tool behind Mbox Viewer. Open, search and export MBOX files of any size — right from your shell, on Linux, macOS, FreeBSD and Windows.

`Latest v0.7.1`  `Free & open source`  `Written in Rust`  `MIT`

[View source on GitHub](https://github.com/dcarrero/mboxshell) [Downloads & releases](https://github.com/dcarrero/mboxshell/releases)

mboxshell

![mboxShell running in a terminal, showing an MBOX archive with its message list, folders and reading pane.](https://mboxviewerpro.com/_astro/screenshot-mboxshell.Ba4cJsaI_2wUWfS.webp)

## A full MBOX toolkit in your terminal

Everything you need to work with huge email archives — reading, searching, threading and exporting — with no GUI and no cloud.

### Any file size

A streaming parser with a 1 MB buffer opens 50 GB+ Gmail Takeout backups while keeping RAM around 500 MB.

### Sub-second re-opens

A persistent binary index — verified with SHA-256 — reopens even the largest archive in under a second.

### Field-based search

Filter with from:, subject:, date:, body:, has:attachment and label:, plus exact phrases and an OR that groups alternatives: a OR b c reads as (a OR b) AND c — in the TUI or from the command line.

### Gmail labels & Google Groups

Detects X-Gmail-Labels and turns them into virtual folders you can browse and filter by. In a Google Takeout archive, each Groups mailbox appears under its own group name.

### Conversation threading

Groups related messages into conversations with the classic JWZ threading algorithm, using Google's own conversation id (X-GM-THRID) when the mailbox carries one.

### Export anywhere

Save messages as EML, CSV, TXT or HTML, and extract attachments individually or in bulk.

### Merge & dedupe

Combine several MBOX files into one, with optional deduplication so nothing is imported twice.

### Full terminal UI

A ratatui-based TUI with three layout modes, vi-style navigation and shell completions for bash, zsh, fish, PowerShell and elvish.

### Cross-platform & bilingual

A single ~5 MB binary with no runtime dependencies. Runs on Linux, macOS, FreeBSD and Windows, with an English/Spanish interface.

## What's new

The three most recent releases. The latest, v0.7.1, shipped on August 20, 2026.

### v0.7.1

August 20, 2026

Search queries that mean what you wrote

-   OR now has a precedence. It used to be a flag on the whole query, so a single OR anywhere turned every term into an alternative: from:alice OR from:bob subject:invoice did not mean "either sender, about invoices" — it returned everything from alice, everything from bob and everything whose subject said invoice, whoever sent it. On a 6,787-message mailbox that is the difference between 49 hits and 2,102. A query is now a list of AND-ed groups, each group a list of OR-ed terms, and OR is what puts two terms in the same group: a OR b c reads as (a OR b) AND c. There are still no parentheses.
-   after:X before:Y was impossible to express. The query held a single date filter, so the second one silently replaced the first and only before: survived — half of what you typed was dropped without a word. Date and size filters now accumulate, which also turns size:>1mb size:<5mb into a real band.
-   after: now includes its own day and before: still excludes its own, so after:2024-01-01 before:2025-01-01 is exactly the year 2024 — the half-open reading Gmail's operators use, and consistent with date:A..B, which was already inclusive. Both manuals and both READMEs document the precedence rule and the date bounds. 23 new tests (234 in total).

[Release notes v0.7.1](https://github.com/dcarrero/mboxshell/releases/tag/v0.7.1)

### v0.7.0

August 20, 2026

The other half of a Google Takeout archive

-   Google Groups mailboxes now open like any other. A Takeout archive holds two kinds of mbox, not one: besides the Gmail export, every group the account owns comes out as Groups/googlegroups.com/<group>@googlegroups.com/topics.mbox, with folder and file names translated into the account's language. In the archive this was built against, that was the largest file of the whole export: 636 MB and 6,787 messages, against 292 MB for the Gmail mbox.
-   The From envelope date of a Groups message no longer resolves to an invented date. Google Groups writes the timezone offset before the year (Thu Apr 16 09:53:04 +0000 2015), which asctime does not allow, so a message with no readable Date: header fell through to a last-resort parse that returned a plausible-looking but wrong 2000-09-16 — no error at all, just a broken sort order and broken date filters.
-   The group shows up as a virtual label in the sidebar, so the labels panel covers a whole Takeout archive instead of just its Gmail half. And the mailbox is no longer listed as topics: it takes the name of the group (<group>@googlegroups.com), which is what really identifies it.
-   Conversations are grouped by Google's real conversation id (X-GM-THRID) when there is one, instead of by subject. On the reference mailbox that went from 1,927 to 1,958 threads, and the largest thread shed 7 messages that never belonged to it.
-   Two older bugs are gone: a message with a repeated Message-ID no longer disappears from the threaded view, and the short option -f, claimed at once by --force and by export's --format, now belongs to one option at a time. Worth knowing before you upgrade: the index format changes, so existing .mboxshell.idx files rebuild themselves the first time you open a mailbox.

[Release notes v0.7.0](https://github.com/dcarrero/mboxshell/releases/tag/v0.7.0)

### v0.6.2

August 7, 2026

Traceable merges, and docs that match the tool

-   merge --source-header now records the mailbox name you know. Apple Mail exports a mailbox as a folder "Inbox.mbox" holding a file called literally "mbox", so every message got stamped X-Mbox-Source: mbox — useless for the one thing the header exists for. Mailboxes that would share a name are told apart by their folder.
-   The docs described a merge --dedup flag that does not exist: deduplication is on by default and the real flag is --no-dedup. Both READMEs and both manuals are corrected, and --source-header — which shipped undocumented in 0.6.1 — is now covered.
-   The merge summary line "Tagged with source" was hardcoded in English while every other line was translated — it now goes through the catalogue too. 7 new tests (202 in total).

[Release notes v0.6.2](https://github.com/dcarrero/mboxshell/releases/tag/v0.6.2)

[Read the full changelog](https://github.com/dcarrero/mboxshell/blob/main/CHANGELOG.md)

## One command away

mboxshell

$ mboxshell archive.mbox

# Open the interactive terminal UI

$ mboxshell search archive.mbox "from:jane has:attachment"

# Search straight from the command line

$ mboxshell export archive.mbox -f eml -o out/

# Export messages to EML, CSV, TXT or HTML

$ mboxshell merge a.mbox b.mbox -o all.mbox --source-header

# Merge files — duplicates removed by default (--no-dedup to keep them), noting which mailbox each message came from

$ mboxshell attachments archive.mbox -o files/

# Extract every attachment at once

### Install it

Grab a pre-built binary for Linux, macOS, FreeBSD or Windows from the releases page, or build it yourself with Cargo:

```
$ cargo install --git https://github.com/dcarrero/mboxshell.git
```

## The open-source engine behind Mbox Viewer

Mbox Viewer for Mac and Windows grew out of mboxShell. The app wraps the same idea — reading MBOX files of any size, fully offline — in a polished native interface with search, labels, threading and EML support. Prefer the terminal? mboxShell is free and MIT-licensed.

[Get it on the Mac App Store](https://apps.apple.com/app/mbox-viewer-pro/id6759237715) [Microsoft Store](https://apps.microsoft.com/store/detail/9NW3GVFG7DDB)

[github.com/dcarrero/mboxshell](https://github.com/dcarrero/mboxshell)
