fob-mail Command Reference

fob-mail <resource> <action> [target] [options]

fob-mail --help, fob-mail <resource> --help and fob-mail <resource> <action> --help print the same information with examples. This page follows fob-mail 0.1.0.

Global options

FlagDescription
--profile <name>, --org <name>Use this profile for one command instead of the current one
-v, --versionPrint the version
-h, --helpHelp for any command

Output

FlagOnDescription
--jsonevery read commandRaw JSON on stdout
--format table|csv|jsonlist commandsOutput format (default table)
--fields <list>list commandsColumns, comma-separated
--output <path>threads list, messages listWrite to a file instead of stdout
--page <n>, --limit <n>threads list, messages listPage number (default 1) and size (default 100, max 500)
--allthreads list, messages listEvery matching row across all pages, up to 15,000

Data goes to stdout; hints such as (using Mail credentials from profile 'acme') go to stderr, so piping JSON is safe. A list's --json is one page unless you add --all:

{ "data": [ … ], "count": 2, "truncated": false, "total": 2, "page": 1, "has_more": false }

The objects in data are the API's, documented per endpoint in the API reference. Errors print Error: <message> and a next step on stderr, and exit with code 1.

mailboxes

The client mailboxes this key may use.

CommandDescription
mailboxes listMailboxes with status, whether they can send, and open threads
mailboxes show <id>One mailbox: address, provider, status, can send, last sync
fob-mail mailboxes list --json
fob-mail mailboxes show mb4k2x9q1z7c

threads

Conversations, and the status, assignee and labels Mail keeps on them.

threads list

Threads, newest activity first.

FlagDescription
--mailbox <id>Only this mailbox
--status open|waiting|doneOnly this status
--assignee <who>A user id, api_key:<id>, me (this key) or none
--label <name>Has this label (name or id); repeat to require several
--search <text>Subject or sender contains
--from <address>A message is from an address containing this
--since <date>, --until <date>Last message on or after / on or before (YYYY-MM-DD or ISO time)
--updated-since <time>Changed after: new message, status, assignee or labels
--sort asc|descBy last message (default desc)

Default fields: id,status,from,subject,last,labels.

fob-mail threads list --status open --mailbox mb4k2x9q1z7c
fob-mail threads list --label bill --assignee none --json
fob-mail threads list --updated-since 2026-11-17T09:00:00Z --sort asc --all --json

threads show

threads show <id>: a thread with its messages, attachments and labels. Attachment ids for attachments pull come from here.

threads edit

threads edit <id>: set a thread's status or assignee, add or remove labels. Needs the Read and label preset or higher.

FlagDescription
--status open|waiting|doneNew status
--assignee <who>A user id, api_key:<id>, me (this key) or none (unassign)
--add-label <name>Add a label (name or id; it must exist); repeatable
--remove-label <name>Remove a label; repeatable
fob-mail threads edit th9a8b7c6d5e --status waiting --assignee me
fob-mail threads edit th9a8b7c6d5e --add-label bill --remove-label inbox-triage

threads reply

threads reply <id>: sends a plain-text reply from the client's mailbox, to the sender of the last message. It can't be undone. Google mailboxes only, no Cc or attachments. Needs the Read, label and send preset.

FlagDescription
--body <text>The reply
--body-file <path>Read the reply from a file (- for stdin)
--idempotency-key <key>Your id for this reply. Default: derived from the thread and the text
fob-mail threads reply th9a8b7c6d5e --body "Received, thank you."
fob-mail threads reply th9a8b7c6d5e --body-file reply.txt --idempotency-key bills:th9a8b7c6d5e:ack

See Nothing is sent twice.

messages

Single messages across threads.

messages list

Messages, oldest first. No bodies unless --with-body.

FlagDescription
--mailbox <id>, --thread <id>Only this mailbox or thread
--direction inbound|outboundReceived by, or sent from, the mailbox
--message-id <id>The RFC Message-ID, with or without <>
--since <date>, --until <date>Sent on or after / on or before
--updated-since <time>Stored or changed after. Use it to read new mail without missing any
--with-bodyInclude body_text
--sort asc|descBy sent date (default asc)

Default fields: id,thread,direction,from,subject,sent.

fob-mail messages list --direction inbound --updated-since 2026-11-17T09:00:00Z --all --json
fob-mail messages list --message-id '<[email protected]>'

messages show

messages show <id>: headers, text body and attachments. --html prints the sender's HTML body instead, verbatim.

messages pull

messages pull <id>: download the stored RFC 822 message as an .eml file. -o, --output <path> sets the file (default <id>.eml in the current folder; - for stdout).

fob-mail messages pull ms1a2s3d4f5g -o invoice.eml

messages send

messages send: sends a new message from the client's mailbox, starting a new thread. It can't be undone. Plain text, Google mailboxes only, no attachments. Needs the Read, label and send preset.

FlagDescription
--mailbox <id>Mailbox to send from (required)
--to <address>Recipient (required); repeatable
--cc <address>Cc; repeatable
--subject <text>Subject (required)
--body <text>, --body-file <path>The message, inline or from a file (- for stdin)
--idempotency-key <key>Your id for this message. Default: derived from mailbox, recipients, subject and text
fob-mail messages send --mailbox mb4k2x9q1z7c --to [email protected] \
  --subject "Statement for October" --body "Could you send the October statement?"

Nothing is sent twice

threads reply and messages send carry an idempotency key. Without --idempotency-key, fob-mail derives one from what is sent, so running the same command again after a timeout returns the first result and sends nothing. The key used is printed on stderr. To send the same text again on purpose, pass a new key.

If Gmail's answer was lost, the result's send_status is pending: it may or may not have gone out. Check the client's Sent folder before sending again with a new key.

attachments

attachments pull <id>: download an attachment. Ids are listed by threads show and messages show. -o, --output <path> is a file or a folder (default: the attachment's filename in the current folder; - for stdout).

fob-mail attachments pull at0p9o8i7u6y -o ./bills/

labels

CommandDescription
labels listThe firm's labels
labels create <name> [--color <hex>]Create a label; returns the existing one if the name is taken

Label a thread with threads edit <id> --add-label <name>.

config profiles

Alias orgs. See Setup.

CommandDescription
config profiles listProfiles, the current one marked with *
config profiles current (alias whoami)The active profile and its firm
config profiles add <name> --api-key <key> --api-secret <secret> [--api-url <url>]Add or update a profile
config profiles use <name>Set the current profile
config profiles remove <name> (alias rm)Remove a profile from this machine
config profiles refresh [name] [--all]Re-read a profile's firm from Mail

getting-started

fob-mail getting-started prints the setup steps, or says setup is done when a profile exists.