pop/README.md

158 lines
4.2 KiB
Markdown
Raw Normal View History

2023-06-21 21:49:11 +03:00
# Pop
2023-06-14 07:52:36 +03:00
2023-06-21 22:11:55 +03:00
<p>
2023-07-05 17:51:22 +03:00
<img src="https://stuff.charm.sh/pop/pop-logo.png" width="400" />
2023-06-21 22:52:13 +03:00
<br />
2023-06-22 23:16:30 +03: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 22:11:55 +03:00
</p>
2023-06-14 07:52:36 +03:00
Send emails from your terminal.
2023-07-11 21:14:33 +03:00
<img width="500" src="https://vhs.charm.sh/vhs-5Dyv3pvzB2YwtUSr72LqSz.gif" alt="pop mail text-based client">
2023-06-21 22:11:55 +03:00
## Text-based User Interface
Launch the TUI
```bash
pop
```
2023-06-14 07:52:36 +03:00
## Command Line Interface
```bash
2023-06-21 21:49:11 +03:00
pop < message.md \
--from "me@example.com" \
--to "you@example.com" \
--subject "Hello, world!" \
--attach invoice.pdf
2023-06-14 07:52:36 +03:00
```
2023-07-11 05:47:59 +03:00
<img width="500" src="https://vhs.charm.sh/vhs-5Cr6Gt1YVBjxGr9zdS85AO.gif" alt="pop mail command line client">
2023-06-21 22:23:06 +03:00
2023-06-27 21:22:46 +03: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 22:52:13 +03:00
2023-06-27 21:22:46 +03:00
You can grab one from: https://resend.com/api-keys.
### Environment
2023-06-21 22:52:13 +03:00
2023-07-11 17:21:28 +03:00
To avoid typing your `From: ` email address, you can also set the `POP_FROM`
environment to pre-fill the field anytime you launch `pop`.
2023-06-21 22:52:13 +03:00
```bash
export RESEND_API_KEY=$(pass RESEND_API_KEY)
2023-07-11 17:21:28 +03:00
export POP_FROM=pop@charm.sh
export POP_SIGNATURE="Sent with [Pop](https://github.com/charmbracelet/pop)!"
```
2023-06-21 22:52:13 +03:00
2023-06-14 07:52:36 +03:00
## Installation
Use a package manager:
```bash
# macOS
2023-06-21 21:49:11 +03:00
brew install pop
2023-06-14 07:52:36 +03:00
# Arch
2023-06-21 21:49:11 +03:00
yay -S pop
2023-06-14 07:52:36 +03:00
# Nix
2023-06-21 21:49:11 +03:00
nix-env -iA nixpkgs.pop
2023-06-14 07:52:36 +03:00
```
Install with Go:
```sh
2023-06-21 21:49:11 +03:00
go install github.com/charmbracelet/pop@latest
2023-06-14 07:52:36 +03:00
```
2023-06-21 21:49:11 +03:00
Or download a binary from the [releases](https://github.com/charmbracelet/pop/releases).
2023-06-14 07:52:36 +03:00
2023-07-10 23:50:43 +03: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-11 05:50:13 +03:00
pop <<< '$(mods -f "Explain why CLIs are awesome")' \
--subject "The command line is the best" \
2023-07-10 23:50:43 +03:00
--preview
```
2023-07-11 00:41:40 +03: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 23:50:43 +03: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-11 00:41:40 +03: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 23:50:43 +03: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-11 05:50:13 +03:00
pop --attach $FILENAME --body "See attached invoice."
2023-07-10 23:50:43 +03:00
```
2023-07-11 00:41:40 +03: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 23:50:43 +03:00
* [`maaslalani/invoice`](https://github.com/maaslalani/invoice)
2023-06-14 07:52:36 +03:00
## License
2023-06-22 23:16:30 +03:00
[MIT](https://github.com/charmbracelet/pop/blob/main/LICENSE)
2023-06-14 07:52:36 +03:00
## Feedback
2023-06-21 21:49:11 +03:00
Wed love to hear your thoughts on this project. Feel free to drop us a note!
2023-06-22 23:16:30 +03:00
- [Twitter](https://twitter.com/charmcli)
- [The Fediverse](https://mastodon.social/@charmcli)
- [Discord](https://charm.sh/chat)
2023-06-21 21:49:11 +03:00
## License
2023-06-22 23:16:30 +03:00
[MIT](https://github.com/charmbracelet/pop/raw/main/LICENSE)
2023-06-21 21:49:11 +03:00
2023-06-22 23:16:30 +03:00
---
2023-06-14 07:52:36 +03:00
2023-06-21 21:49:11 +03:00
Part of [Charm](https://charm.sh).
2023-06-14 07:52:36 +03:00
2023-06-21 21:49:11 +03: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 07:52:36 +03:00
2023-06-22 23:16:30 +03:00
Charm 热爱开源 • Charm loves open source