How floatpane/matcha works
Matcha is a terminal email client. The main workflow starts at the CLI, launches the Bubble Tea application, fetches mail for configured accounts, and presents inbox and message views; users can then search, act on messages, or compose and send mail. A daemon-backed service mediates mailbox operations, with direct-provider fallback. Other documented or indexed capabilities include plugins and their marketplace, rich email rendering, export, encryption, and the optional macOS menu-bar helper. Some subsystem links are omitted where sampled sources do not show their runtime wiring.
Main entry points: app.go Application model · backend.go Provider interface · email_view.go Message view · service.go Mailbox service
Components 24
Terminal client
- CLI entry
main.go - Application model
app/app.go - Inbox and views
tui/inbox.go - Mail search
tui/search.go - Message view
tui/email_view.go
Mail operations
- Message actions
internal/emailactions/manager.go - Fetch and search
fetcher/fetcher.go - Mailbox service
daemonclient/service.go - Mailbox daemon
daemon/handler.go - Provider interface
backend/backend.go - JMAP provider
backend/jmap/jmap.go - Maildir provider
backend/maildir/maildir.go - POP3 provider
backend/pop3/pop3.go - Message sending
sender/sender.go - Mail export
export/export.go
Plugins and extensions
- Plugin runtime
plugin/plugin.go - TUI plugin bridge
internal/pluginbridge/manager.go - Plugin marketplace
internal/marketplace/client.go - Plugin storage
plugin/storage.go
Rendering and platform
- HTML rendering
view/html.go - Markdown conversion
clib/markdown.go - Encryption
pgp/file.go - macOS menu helper
cli/macos_menubar.swift
Other components
- Email user
Connections 24
- Email user → CLI entry: invokes
README.md - CLI entry → Application model: launches
main.go - Application model → Inbox and views: presents
- Application model → Fetch and search: requests mail
app/app.go - Application model → Message actions: coordinates actions
app/app.go - Mail search → Fetch and search: requests search
- Application model → Message view: opens message
- Message actions → Mailbox service: executes mailbox action
internal/emailactions/manager.go - Mailbox service → Mailbox daemon: routes RPC
- Mailbox daemon → Provider interface: calls provider
daemon/handler.go - Mailbox service → Provider interface: direct fallback
daemonclient/service.go - Provider interface → JMAP provider: implemented by
- Provider interface → Maildir provider: implemented by
- Provider interface → POP3 provider: implemented by
- Application model → Message sending: sends mail
- Application model → Mail export: exports mail
- Application model → TUI plugin bridge: integrates plugins
app/app.go - TUI plugin bridge → Plugin runtime: dispatches hooks
internal/pluginbridge/manager.go - Plugin runtime → Plugin storage: persists plugin data
plugin/storage.go - Plugin marketplace → Plugin runtime: supplies plugins
README.md - Message view → HTML rendering: renders HTML
view/html.go - Message sending → Encryption: uses encryption
sender/sender.go - macOS menu helper → Email user: shows mail status
README.md - Message view → Markdown conversion: converts content