Guides

Scan a mailbox

Read receipts straight from Outlook, Microsoft 365, Gmail, iCloud, Fastmail and other mailboxes, picking up where the last scan stopped.

spendyard mailbox scan lists the messages since the last scan, keeps the ones that look like money, and reads those. Each message is read once: the next scan starts where this one stopped.

Gmail, iCloud, Fastmail and others, over IMAP

These need an app password, not your usual one. In Gmail, turn on 2-Step Verification, then create one at myaccount.google.com/apppasswords.

spendyard mailbox login imap you@gmail.com     # asks for the app password and keeps it
spendyard mailbox scan imap --dry-run          # what it would read
spendyard mailbox scan imap

The server is known for the common providers; --server host:port gives another, and --username a user name that isn’t the address.

Outlook and Microsoft 365

Outlook signs in with a code you enter in the browser. Until Spendyard has its own Microsoft app, it needs one of yours: an app registration in Microsoft Entra with the delegated Mail.Read permission and public client flows allowed.

spendyard mailbox login outlook --client-id <app id> --tenant <tenant>
spendyard mailbox scan outlook --dry-run
spendyard mailbox scan outlook

Put the app ID in the config under [mailboxes.outlook] to leave out --client-id.

Scanning

Option
--dry-run List what would be read, without downloading or calling models
--since YYYY-MM-DD From this date. Default: where the last scan stopped, or 30 days ago
--folder Receipts One folder. Default: all of them
--limit 500 Look at most at this many messages, newest first
--all Read every message, not only the ones that look like money
--save ./receipts Also save each message read as .eml
--again Read messages again even when the store has them
-d clef-flash A cheap first model, which pays off on a mailbox

Sign-ins

Tokens and app passwords are kept in ~/.spendyard/tokens.json, readable only by you. To keep them in your OS keychain instead, set SPENDYARD_TOKEN_STORE=keychain.

spendyard mailbox list
spendyard mailbox logout imap