2023-06-21 14:49:11 -04:00
# Pop
2023-06-14 00:52:36 -04:00
2023-06-21 15:11:55 -04:00
<p>
2023-07-05 10:51:22 -04:00
<img src="https://stuff.charm.sh/pop/pop-logo.png" width="400" />
2023-06-21 15:52:13 -04:00
<br />
2023-06-22 16:16:30 -04:00
<a href="https://github.com/charmbracelet/pop/releases"><img src="https://img.shields.io/github/release/charmbracelet/pop.svg" alt="Latest Release"></a>
<a href="https://pkg.go.dev/github.com/charmbracelet/pop?tab=doc"><img src="https://godoc.org/github.com/golang/gddo?status.svg" alt="Go Docs"></a>
<a href="https://github.com/charmbracelet/pop/actions"><img src="https://github.com/charmbracelet/vhs/workflows/build/badge.svg" alt="Build Status"></a>
2023-06-21 15:11:55 -04:00
</p>
2023-06-14 00:52:36 -04:00
Send emails from your terminal.
2023-07-10 22:47:59 -04:00
<img width="500" src="https://vhs.charm.sh/vhs-35QM62TyR89f1oPlPickK3.gif" alt="pop mail text-based client">
2023-06-21 15:11:55 -04:00
## Text-based User Interface
Launch the TUI
```bash
pop
```
2023-06-14 00:52:36 -04:00
## Command Line Interface
```bash
2023-06-21 14:49:11 -04:00
pop < message.md \
--from "me@example .com" \
--to "you@example .com" \
--subject "Hello, world!" \
--attach invoice.pdf
2023-06-14 00:52:36 -04:00
```
2023-07-10 22:47:59 -04:00
<img width="500" src="https://vhs.charm.sh/vhs-5Cr6Gt1YVBjxGr9zdS85AO.gif" alt="pop mail command line client">
2023-06-21 15:23:06 -04:00
2023-06-27 14:22:46 -04:00
---
<img width="600" src="https://stuff.charm.sh/pop/resend-x-charm.png" alt="Resend and Charm logos">
To use `pop` , you will need a `RESEND_API_KEY` .
2023-06-21 15:52:13 -04:00
2023-06-27 14:22:46 -04:00
You can grab one from: https://resend.com/api-keys.
### Environment
2023-06-21 15:52:13 -04:00
2023-06-22 13:31:40 -04:00
To avoid typing your `From: ` email address, you can also set the `RESEND_FROM`
environment to pre-fill the field anytime you launch `pop` .
2023-06-21 15:52:13 -04:00
2023-06-22 13:31:40 -04:00
```bash
export RESEND_API_KEY=$(pass RESEND_API_KEY)
export RESEND_FROM=pop@charm .sh
```
2023-06-21 15:52:13 -04:00
2023-06-14 00:52:36 -04:00
## Installation
Use a package manager:
```bash
# macOS
2023-06-21 14:49:11 -04:00
brew install pop
2023-06-14 00:52:36 -04:00
# Arch
2023-06-21 14:49:11 -04:00
yay -S pop
2023-06-14 00:52:36 -04:00
# Nix
2023-06-21 14:49:11 -04:00
nix-env -iA nixpkgs.pop
2023-06-14 00:52:36 -04:00
```
Install with Go:
```sh
2023-06-21 14:49:11 -04:00
go install github.com/charmbracelet/pop@latest
2023-06-14 00:52:36 -04:00
```
2023-06-21 14:49:11 -04:00
Or download a binary from the [releases ](https://github.com/charmbracelet/pop/releases ).
2023-06-14 00:52:36 -04:00
2023-07-10 16:50:43 -04:00
## Examples
Pop can be combined with other tools to create powerful email pipelines, such as:
* [`charmbracelet/mods` ](https://github.com/charmbracelet/mods )
* [`charmbracelet/gum` ](https://github.com/charmbracelet/gum )
* [`maaslalani/invoice` ](https://github.com/maaslalani/invoice )
### Mods
Use [`mods` ](https://github.com/charmbracelet/mods ) with `pop` to write an email body with AI:
> **Note**:
> Use the `--preview` flag to preview the email and make changes before sending.
```bash
2023-07-10 22:50:13 -04:00
pop <<< '$(mods -f "Explain why CLIs are awesome")' \
--subject "The command line is the best" \
2023-07-10 16:50:43 -04:00
--preview
```
2023-07-10 17:41:40 -04:00
<img width="600" src="https://vhs.charm.sh/vhs-1O3zo8Nsi2kPVW3vOBw4WH.gif" alt="Generate email with mods and send email with pop.">
2023-07-10 16:50:43 -04:00
* [`charmbracelet/mods` ](https://github.com/charmbracelet/mods )
### Gum
Use [`gum` ](https://github.com/charmbracelet/gum ) with `pop` to choose an email to send to and from:
```bash
pop --from $(gum choose "vt52@charm .sh" "vt78@charm .sh" "vt100@charm .sh")
--to $(gum filter < contacts.txt)
```
2023-07-10 17:41:40 -04:00
<img width="600" src="https://vhs.charm.sh/vhs-Et9ooHB6L1XVWDL9U1TfI.gif" alt="Select contact information with gum and send email with pop.">
2023-07-10 16:50:43 -04:00
* [`charmbracelet/gum` ](https://github.com/charmbracelet/gum )
### Invoice
Use [`invoice` ](https://github.com/maaslalani/invoice ) with `pop` to generate and send invoices entirely from the command line.
```bash
FILENAME=invoice.pdf
invoice generate --item "Rubber Ducky" --rate 25 --quantity 2 --output $FILENAME
2023-07-10 22:50:13 -04:00
pop --attach $FILENAME --body "See attached invoice."
2023-07-10 16:50:43 -04:00
```
2023-07-10 17:41:40 -04:00
<img width="600" src="https://vhs.charm.sh/vhs-4TRyv82BBDKOutgWdvyshr.gif" alt="Generate invoice with invoice and attach file and send email with pop.">
2023-07-10 16:50:43 -04:00
* [`maaslalani/invoice` ](https://github.com/maaslalani/invoice )
2023-06-14 00:52:36 -04:00
## License
2023-06-22 16:16:30 -04:00
[MIT ](https://github.com/charmbracelet/pop/blob/main/LICENSE )
2023-06-14 00:52:36 -04:00
## Feedback
2023-06-21 14:49:11 -04:00
We’ d love to hear your thoughts on this project. Feel free to drop us a note!
2023-06-22 16:16:30 -04:00
- [Twitter ](https://twitter.com/charmcli )
- [The Fediverse ](https://mastodon.social/@charmcli )
- [Discord ](https://charm.sh/chat )
2023-06-21 14:49:11 -04:00
## License
2023-06-22 16:16:30 -04:00
[MIT ](https://github.com/charmbracelet/pop/raw/main/LICENSE )
2023-06-21 14:49:11 -04:00
2023-06-22 16:16:30 -04:00
---
2023-06-14 00:52:36 -04:00
2023-06-21 14:49:11 -04:00
Part of [Charm ](https://charm.sh ).
2023-06-14 00:52:36 -04:00
2023-06-21 14:49:11 -04:00
<a href="https://charm.sh/">
<img
alt="The Charm logo"
width="400"
src="https://stuff.charm.sh/charm-badge.jpg"
/>
</a>
2023-06-14 00:52:36 -04:00
2023-06-22 16:16:30 -04:00
Charm 热爱开源 • Charm loves open source