Skip to content
Edith

Docs

Command reference

Inbox scope

Inbox scope reads a local Mailpit for the projects you save. Enable inboxScope, then use ed invoke. Every payload is a JSON object. Operations that read Mailpit take an optional projectID and use the selected project without one; message operations also need messageID.

Terminal
ed invoke inboxScope inboxScope.saveProject --json '{"project":{"name":"Sample","endpoint":"http://127.0.0.1:8025","filter":"to:invite@example.test"}}'ed invoke inboxScope inboxScope.messagesed invoke inboxScope inboxScope.latested invoke inboxScope inboxScope.markRead --json '{"messageID":"<id>","read":false}'

Copy message ids from the messages result (messages[].ID).

Operations

Operation Payload Result
inboxScope.projects {} state (projects, selectedID) and an optional issue
inboxScope.saveProject project with name, endpoint, optional filter and id Adds or updates a project and selects it; returns the projects
inboxScope.select projectID Selects a project; returns the projects
inboxScope.removeProject optional projectID Removes a project; returns the projects
inboxScope.dismissIssue {} Clears issue; returns the projects
inboxScope.messages optional projectID, start Mailpit's list or search result, 50 messages from start
inboxScope.latest optional projectID The newest matching message as message and its candidates
inboxScope.message messageID The message and its candidates (codes and links, likely ones first)
inboxScope.headers messageID headers, each name with its values
inboxScope.htmlCheck messageID supported and Mailpit's HTML check result
inboxScope.linkCheck messageID supported and Mailpit's link check result
inboxScope.markRead messageID, optional read (default true) {}
inboxScope.delete messageID {}; the message is removed from Mailpit
inboxScope.watch optional projectID revision and live for the project's event stream

Endpoints must use localhost, 127.0.0.1 or [::1], without credentials, query or fragment; redirects are refused and responses over 8 MiB fail. Reading a message, including through latest, marks it read, because Mailpit's API does. linkCheck makes Mailpit request every link in the message, which can use up a single-use link. A Mailpit that does not offer a check answers with "supported": false.

actions.catalog lists copyCode, copyLink and openLatest for Bifrost; run one with actions.perform and {"actionID":"copyCode"}. For Mailpit on another machine, forward its port with ed machines forwards add and save the local port.