Send emails from your terminal.
Launch the TUI
pop
pop < message.md \
--from "[email protected]" \
--to "[email protected]" \
--subject "Hello, world!" \
--attach invoice.pdf
To use pop
, you will need a RESEND_API_KEY
or configure an
SMTP
host.
You can grab one from: https://resend.com/api-keys.
To use the resend delivery method, set the RESEND_API_KEY
environment
variable.
export RESEND_API_KEY=$(pass RESEND_API_KEY)
To configure pop
to use SMTP
, you can set the following environment
variables.
export POP_SMTP_HOST=smtp.gmail.com
export POP_SMTP_PORT=587
export [email protected]
export POP_SMTP_PASSWORD=hunter2
To avoid typing your From:
email address, you can also set the POP_FROM
environment to pre-fill the field anytime you launch pop
.
export [email protected]
export POP_SIGNATURE="Sent with [Pop](https://github.com/charmbracelet/pop)!"
Note: If you wish to use a resend account without a custom domain, you can use
[email protected]
to send emails.
Use a package manager:
# macOS or Linux
brew install pop
# Nix
nix-env -iA nixpkgs.pop
# Arch (btw)
yay -S charm-pop-bin
Install with Go:
go install github.com/charmbracelet/pop@latest
Or download a binary from the releases.
Pop can be combined with other tools to create powerful email pipelines, such as:
Use mods
with pop
to write an email body with AI:
Note: Use the
--preview
flag to preview the email and make changes before sending.
pop <<< "$(mods -f 'Explain why CLIs are awesome')" \
--subject "The command line is the best" \
--preview
Use gum
with pop
to choose an email to send to and from:
pop --from $(gum choose "[email protected]" "[email protected]" "[email protected]")
--to $(gum filter < contacts.txt)
Use invoice
with pop
to generate and send invoices entirely from the command line.
FILENAME=invoice.pdf
invoice generate --item "Rubber Ducky" --rate 25 --quantity 2 --output $FILENAME
pop --attach $FILENAME --body "See attached invoice."
We’d love to hear your thoughts on this project. Feel free to drop us a note!
Part of Charm.
Charm 热爱开源 • Charm loves open source