Caeml
cat eml files, with "uninteresting" headers stripped and "interesting" ones decoded
Install / Use
/learn @ferdinandyb/CaemlREADME
CAEML
Reads an email file from either STDIN or from a file passed as the first argument, digests it and outputs it to STDOUT in a more human readable format. This means only From, To, Cc, Bcc, Date and Subject headers are kept and these are decoded and of all the parts only text/plain is returned.
Why?
A modern email will have about 60 lines of headers before the From header and the "interesting" headers will be encoded in a way, that is pretty hard for humans to read. And that's if the email was two lines. If there were also attachments, then good luck finding anything useful quickly.
Of course this is why you use a MUA instead of reading raw emails, but caeml was written for two use cases. One, poking around in your maildir folder, when trying to figure out what's going wrong with your syncing and previewing message/rfc822 attachments in aerc.
Installation
go install github.com/ferdinandyb/caeml@latest
Usage
- read from STDIN:
cat test.eml | caeml - read from file:
caeml test.eml - change order of headers:
caeml -H "Subject,To,From,Message-Id" test.eml - print only headers:
caeml -O test.eml - also print contents of any
message/rfc822parts:caeml -D test.eml(respects-Oand-Hfor these as well)
Default header order is: caeml -H "From,To,Cc,Bcc,Date,Subject"
If a header is empty it will not be displayed.
Integration
aerc
message/rfc822=caeml | colorize
Contribution
Patches sent in email are also welcome :)
Related Skills
node-connect
340.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
340.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.2kCommit, push, and open a PR
