maton google-mail message list

maton google-mail message list [flags]

List messages in the active Gmail mailbox. Read-only — never modifies anything. Defaults to the unread queue (q=is:unread). Pass –hydrate to fetch From/Subject/Date for each result and render a table; without –hydrate the raw {messages: [{id, threadId}], …} envelope is printed.

Options

--connection <string>
Connection ID to route through (Maton-Connection header)
--dry-run
Print the request that would be sent without executing it
--format <string>
Output format: 'json' (default) or 'text' on supported commands
--hydrate
Fetch From/Subject/Date for each result and render a table
-q, --jq <expression>
Filter JSON output using a jq expression
--label <strings>
Restrict to label IDs (repeatable)
-L, --max <int> (default 20)
Maximum messages per page
--paginate
Follow next_cursor and concatenate all pages (list commands only)
--query <string> (default "is:unread")
Gmail search query
--template <string>
Format JSON output using a Go template; see "maton help formatting"

Options inherited from parent commands

-p, --profile <string>
Profile to use for this invocation (overrides the active profile; also reads MATON_PROFILE)

Examples

$ maton google-mail message list
$ maton google-mail message list -L 5 --query 'from:boss'
$ maton google-mail message list --hydrate --format text
$ maton google-mail message list --paginate --query 'newer_than:7d'

See also