Skip to content
Briskmail
Get early access

Briskmail Read and organize

briskmail attachments

List attachment names, types and sizes, or save one to an exact path.

Taught in lesson 4, Prompt injection.

Usage

briskmail attachments <message-id | draft-id> [--json] [--save NUMBER --to PATH]

HTML-only bodies are omitted until VisibleText and untrusted_email_content wrapping land in task 4.3.

Runs only while Let apps read and organize my mail is on. With it off, the command exits 2 and names the switch.

Arguments and flags

<message-id>required
Gmail's id for the message, or a draft id as save-draft prints it.
--json
Print one JSON document.
--save NUMBER
One-based attachment number from the metadata list.
--to PATH
Exact absolute destination file path. The file must not exist.

Global flags

--account ID
An account id, as briskmail accounts prints it. Leave it out to use the first account. Accepted before or after the command.
--dev
Send the command to the dev build (com.valleyedgeconsulting.edgemail.dev) instead of Briskmail. Only useful when working on Briskmail itself.

Exit codes

CodeMeaning
0Done. Prints metadata, or the saved attachment.
2Not allowed: macOS refused Automation for the app you ran it from (-1743), or this command's switch is off. The message names the switch.
3Briskmail reported an error, printed on stderr.
64Bad usage.

Examples

briskmail attachments 18f2a9c4be01d7a3
briskmail attachments r-4823019577301845124

A draft id works too, so a save-draft with --attach can be checked.

The CLI comes inside Briskmail.

Install the app and the briskmail command is in its bundle. 7 days free, then pay once.

Get early access