himalaya/README.md

217 lines
6.5 KiB
Markdown
Raw Normal View History

2021-03-05 09:38:35 +00:00
# 📫 Himalaya [WIP] [![gh-actions](https://github.com/soywod/himalaya/workflows/deployment/badge.svg)](https://github.com/soywod/himalaya/actions?query=workflow%3Adeployment)
2020-12-24 23:36:24 +00:00
2021-01-02 23:49:51 +00:00
Minimalist CLI email client, written in Rust.
2021-01-17 15:03:38 +00:00
![image](https://user-images.githubusercontent.com/10437171/104848096-aee51000-58e3-11eb-8d99-bcfab5ca28ba.png)
## Table of contents
* [Motivation](#motivation)
* [Installation](#installation)
2021-03-10 21:35:06 +00:00
* [Configuration](#configuration)
2021-01-17 15:03:38 +00:00
* [Usage](#usage)
* [List mailboxes](#list-mailboxes)
2021-03-10 21:35:06 +00:00
* [List messages](#list-messages)
* [Search messages](#search-messages)
* [Download attachments](#download-attachments)
* [Read a message](#read-a-message)
* [Write a new message](#write-a-new-message)
* [Reply to a message](#reply-to-a-message)
* [Forward a message](#forward-a-message)
2021-01-17 15:03:38 +00:00
* [License](https://github.com/soywod/himalaya/blob/master/LICENSE)
* [Changelog](https://github.com/soywod/himalaya/blob/master/CHANGELOG.md)
* [Credits](#credits)
## Motivation
2021-03-10 21:35:06 +00:00
Bringing emails to the terminal is a pain. The mainstream TUI, (neo)mutt, takes
time to configure. The default mapping is not intuitive when coming from the
Vim environment. It is even scary to use at the beginning, since you are
2021-01-17 15:03:38 +00:00
dealing with sensitive data!
2021-03-10 22:08:31 +00:00
The aim of Himalaya is to extract the email logic into a simple (yet solid) CLI
API that can be used either directly from the terminal or UIs. It gives users
more flexibility.
2021-01-17 15:03:38 +00:00
## Installation
2021-01-02 23:49:51 +00:00
```bash
2021-01-17 15:03:38 +00:00
curl -sSL https://raw.githubusercontent.com/soywod/himalaya/master/install.sh | bash
```
*See [wiki section](https://github.com/soywod/himalaya/wiki/Installation) for
more information.*
## Configuration
```toml
# ~/.config/himalaya/config.toml
name = "Your full name"
2021-03-10 21:35:06 +00:00
downloads-dir = "/abs/path/to/downloads"
2021-01-17 15:03:38 +00:00
# Himalaya supports the multi-account
# Each account should be inside a TOML section
[gmail]
default = true
email = "my.email@gmail.com"
2021-03-10 21:35:06 +00:00
imap-host = "imap.gmail.com"
imap-port = 993
imap-login = "test@gmail.com"
imap-passwd_cmd = "pass show gmail"
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
smtp-host = "smtp.gmail.com"
smtp-port = 487
smtp-login = "test@gmail.com"
smtp-passwd_cmd = "pass show gmail"
2021-01-17 15:03:38 +00:00
[posteo]
name = "Your overriden full name"
2021-03-10 21:35:06 +00:00
downloads-dir = "/abs/path/to/overriden/downloads"
email = "test@posteo.net"
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
imap-host = "posteo.de"
imap-port = 993
imap-login = "test@posteo.net"
imap-passwd_cmd = "security find-internet-password -gs posteo -w"
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
smtp-host = "posteo.de"
smtp-port = 487
smtp-login = "test@posteo.net"
smtp-passwd_cmd = "security find-internet-password -gs posteo -w"
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
# [other accounts]
2021-01-17 15:03:38 +00:00
# ...
```
*See [wiki section](https://github.com/soywod/himalaya/wiki/Configuration) for
more information.*
## Usage
```
2021-03-10 22:08:31 +00:00
Himalaya 0.2.0
2021-01-14 23:02:15 +00:00
soywod <clement.douin@posteo.net>
2021-01-02 23:49:51 +00:00
📫 Minimalist CLI email client
USAGE:
2021-01-17 09:03:19 +00:00
himalaya [OPTIONS] [SUBCOMMAND]
2021-01-02 23:49:51 +00:00
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
2021-01-17 09:03:19 +00:00
OPTIONS:
2021-03-10 21:35:06 +00:00
-a, --account <STRING> Name of the account to use
-o, --output <STRING> Format of the output to print [default: text] [possible values: text, json]
2021-01-17 09:03:19 +00:00
2021-01-02 23:49:51 +00:00
SUBCOMMANDS:
2021-01-15 11:21:07 +00:00
attachments Downloads all attachments from an email
forward Forwards an email
help Prints this message or the help of the given subcommand(s)
2021-01-17 09:03:19 +00:00
list Lists emails sorted by arrival date
mailboxes Lists all available mailboxes
2021-01-15 11:21:07 +00:00
read Reads text bodies of an email
reply Answers to an email
2021-03-10 21:35:06 +00:00
save Saves a raw message in the given mailbox
2021-01-15 11:21:07 +00:00
search Lists emails matching the given IMAP query
2021-03-10 21:35:06 +00:00
send Sends a raw message
template Generates a message template
2021-01-15 11:21:07 +00:00
write Writes a new email
2021-01-02 23:49:51 +00:00
```
2021-01-17 15:03:38 +00:00
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage) for more
information.*
### List mailboxes
2021-03-10 21:35:06 +00:00
Shows mailboxes in a basic table.
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
![image](https://user-images.githubusercontent.com/10437171/104848169-0e432000-58e4-11eb-8410-05f0404c0d99.png)
2021-01-17 15:03:38 +00:00
2021-03-10 22:08:31 +00:00
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:list-mailboxes)
2021-01-17 15:03:38 +00:00
for more information.*
2021-03-10 21:35:06 +00:00
### List messages
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
Shows messages in a basic table.
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
![image](https://user-images.githubusercontent.com/10437171/104848096-aee51000-58e3-11eb-8d99-bcfab5ca28ba.png)
2021-01-17 15:03:38 +00:00
2021-03-10 22:08:31 +00:00
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:list-messages) for
2021-01-17 15:03:38 +00:00
more information.*
2021-03-10 21:35:06 +00:00
### Search messages
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
Shows filtered messages in a basic table. The query should follow the
[RFC-3501](https://tools.ietf.org/html/rfc3501#section-6.4.4).
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
![image](https://user-images.githubusercontent.com/10437171/110698977-9d86f880-81ee-11eb-8990-0ca89c7d4640.png)
2021-01-17 15:03:38 +00:00
2021-03-10 22:08:31 +00:00
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:search-messages) for
2021-01-17 15:03:38 +00:00
more information.*
2021-03-10 21:35:06 +00:00
### Download attachments
2021-01-17 15:03:38 +00:00
2021-03-10 22:08:31 +00:00
Downloads all attachments directly to the [`downloads-dir`](#configuration).
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
![image](https://user-images.githubusercontent.com/10437171/104848278-890c3b00-58e4-11eb-9b5c-48807c04f762.png)
2021-01-17 15:03:38 +00:00
2021-03-10 22:08:31 +00:00
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:download-attachments)
2021-01-17 15:03:38 +00:00
for more information.*
2021-03-10 21:35:06 +00:00
### Read a message
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
Shows the text content of a message (`text/plain` if exists, otherwise
2021-03-10 22:08:31 +00:00
`text/html`). Can be overriden by the `--mime-type` option.
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
![image](https://user-images.githubusercontent.com/10437171/110701369-5d754500-81f1-11eb-932f-94c2ca8db068.png)
2021-01-17 15:03:38 +00:00
2021-03-10 22:08:31 +00:00
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:read-a-message) for
2021-01-17 15:03:38 +00:00
more information.*
2021-03-10 21:35:06 +00:00
### Write a new message
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
Opens your default editor (from the `$EDITOR` environment variable) to compose
a new message.
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
```bash
himalaya write
2021-01-17 15:03:38 +00:00
```
2021-03-10 22:08:31 +00:00
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:write-a-new-message) for
2021-01-17 15:03:38 +00:00
more information.*
2021-03-10 21:35:06 +00:00
### Reply to a message
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
Opens your default editor to reply to a message.
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
```bash
himalaya reply --all 5123
2021-01-17 15:03:38 +00:00
```
2021-03-10 22:08:31 +00:00
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:reply-to-a-message) for
2021-01-17 15:03:38 +00:00
more information.*
2021-03-10 21:35:06 +00:00
### Forward a message
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
Opens your default editor to forward a message.
2021-01-17 15:03:38 +00:00
2021-03-10 21:35:06 +00:00
```bash
himalaya forward 5123
2021-01-17 15:03:38 +00:00
```
2021-03-10 22:08:31 +00:00
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:forward-a-message) for
2021-01-17 15:03:38 +00:00
more information.*
## Credits
- [IMAP RFC3501](https://tools.ietf.org/html/rfc3501)
- [Iris](https://github.com/soywod/iris.vim), the himalaya predecessor
2021-03-10 22:08:31 +00:00
- [isync](https://isync.sourceforge.io/), an email synchronizer for offline usage
- [NeoMutt](https://neomutt.org/), an email terminal user interface
- [Alpine](http://alpine.x10host.com/alpine/alpine-info/), an other email terminal user interface
- [mutt-wizard](https://github.com/LukeSmithxyz/mutt-wizard), a tool over NeoMutt and isync
- [rust-imap](https://github.com/jonhoo/rust-imap), a rust IMAP lib