Skip to content

Cleanup

Cleanup is Herald’s high-leverage inbox reduction screen. It groups mail by sender or domain, shows detail rows, previews individual messages, and exposes destructive actions, archive, unsubscribe, hide-future-mail, automation rules, custom prompts, and cleanup rule management.

Press 3 to open Cleanup. Use it when you want to answer questions like “which senders have the most mail?”, “what can I archive?”, “what can I delete?”, and “which future mail should be hidden or automated?”

AreaWhat it shows
Folder sidebarFolder tree and counts when the terminal is wide enough and no cleanup preview is hiding it.
Summary tableGroup rows by sender or domain with columns for selection, Sender/Domain, Count, and Dates.
Detail tableEmails for the focused summary row with columns for selection, Date, Subject, Size, and Att.
Preview panelCurrent cleanup email body, header metadata, action hints, unsubscribe visibility, scroll state, delete/archive progress.
Full-screen previewCleanup preview expanded across the terminal.
Rule editor overlayFull-screen Automation Rule form opened by W.
Custom prompt overlayFull-screen prompt editor opened by P.
Cleanup manager overlayFull-screen saved cleanup rules manager opened by C.
Status barSender/domain mode, selection counts, deletion/archive progress, dry-run mode, folder counts, and confirmations.
KeyContextPreconditionsResult
dCleanupNot loading.Toggles sender grouping and domain grouping.
spaceSummary or detailsVisible data can be interacted with.Selects or unselects the focused sender/domain row or message row.
enterSummarySummary focused.Loads detail table for the focused sender/domain.
enterDetailsDetails focused and preview closed.Opens preview for the focused message.
enterPreviewCleanup preview open and details focused.Scrolls preview down one line.
j / downSummary/detailsPreview not intercepting scroll.Moves selection down.
k / upSummary/detailsPreview not intercepting scroll.Moves selection up.
j / downPreviewCleanup preview open and details focused.Scrolls body down.
k / upPreviewCleanup preview open and details focused.Scrolls body up.
DCleanupNot loading, not already deleting, target exists.Opens delete confirmation or directly queues current preview email.
eCleanupNot loading, not already deleting, target exists.Opens archive confirmation or directly queues current preview email.
ACleanup previewAI configured and preview email exists.Re-classifies the preview email.
uCleanup previewBody includes List-Unsubscribe.Opens unsubscribe confirmation.
h / HCleanupFocused sender or preview email exists.Creates hide-future-mail behavior for that sender.
WCleanupRule editor closed.Opens automation rule editor, prefilled with focused sender or domain.
PMain UIRule/prompt/settings overlays are closed.Opens custom AI prompt editor.
CCleanupCleanup manager closed.Opens saved cleanup rules manager.
zCleanup previewPreview open.Toggles full-screen cleanup reader.
escCleanup preview/overlaysPreview, full-screen, or overlay active.Closes the active state.
tab / shift+tabCleanupVisible panels available.Cycles between sidebar, summary, details, and chat when present.
  1. Press 3.
  2. Keep sender mode or press d for domain mode.
  3. Move through the summary table with j/k.
  4. Press enter to load details.
  5. Press tab to focus details, then move through messages.
  6. Press enter to preview a message.
  1. Focus the summary table.
  2. Press space on one or more senders or domains.
  3. Press D to delete or e to archive.
  4. Read the confirmation description in the status bar.
  5. Press y to confirm or n/Esc to cancel.
  1. Load details for a sender or domain.
  2. Press tab to focus details.
  3. Press space on individual messages.
  4. Press D or e.
  5. Confirm only when the status description matches your selection.
  1. Focus a sender in the summary table or open a message preview.
  2. Press h.
  3. Herald creates the backend rule/action used to hide matching future mail.
  1. Focus a sender or domain that should trigger automation.
  2. Press W.
  3. Choose trigger type: sender, domain, or AI category.
  4. Enter trigger value.
  5. Select actions: desktop notification, move, archive, delete, webhook, or shell command.
  6. Fill action details such as destination folder, webhook URL/body, shell command, or notification text.
  7. Complete the form to save.
  1. Press C.
  2. Press n to create a cleanup rule, enter to edit selected, d to delete, or r to run all.
  3. In the edit form, set rule name, match type, match value, action, older-than days, and enabled state.
  4. Press esc to leave edit mode or close the manager.
StateWhat happens
Sender modeSummary groups exact sender addresses.
Domain modeSummary groups extracted sender domains.
Empty summaryNo cleanup groups are available for the folder/cache state.
Selected summary rowsStatus reports selected sender/domain count.
Selected detail rowsStatus reports selected message count and sender/domain spread.
Delete/archive confirmationStatus bar asks for y confirm or n/Esc cancel.
Deleting/archive in progressRequests are queued serially; status shows progress and reconnect messages when needed.
Cleanup previewSidebar hides to make room; details panel can scroll the body.
Full-screen previewCleanup preview expands and rewraps body lines.
AI unavailableA and category-trigger workflows cannot classify new content.
Dry-run modeStatus shows [DRY RUN]; destructive rules can be exercised without live mutation when that runtime mode is active.
Narrow terminalCleanup collapses columns and can hide the sidebar or summary panel while preview is open.

Cleanup reads cached sender statistics, message metadata, message bodies for previews, unsubscribe headers, classifications, and rules. Delete and archive write to the IMAP mailbox and update SQLite cache. Hide-future-mail, automation rules, custom prompts, and cleanup rules are stored through Herald’s backend. Webhook and shell-command automation can send or expose email-derived values outside Herald when you configure those actions.

If delete/archive is not available, check whether a deletion is already running or the selected folder is read-only.

If a confirmation describes the wrong target, press n or Esc, clear selections with space, and select again.

If u does nothing, the previewed message does not include a usable List-Unsubscribe header.

If automation actions do not run, reopen W or C to verify the rule is enabled and that the match value is precise.