improve readme

This commit is contained in:
Clément DOUIN 2021-03-10 22:35:06 +01:00
parent f8833ccd7c
commit c24879c152
No known key found for this signature in database
GPG key ID: 69C9B9CFFDEE2DEF

231
README.md
View file

@ -8,28 +8,30 @@ Minimalist CLI email client, written in Rust.
* [Motivation](#motivation) * [Motivation](#motivation)
* [Installation](#installation) * [Installation](#installation)
* [Configuration](#configuration)
* [Usage](#usage) * [Usage](#usage)
* [List mailboxes](#list-mailboxes) * [List mailboxes](#list-mailboxes)
* [List emails](#list-emails) * [List messages](#list-messages)
* [Search emails](#search-emails) * [Search messages](#search-messages)
* [Download email attachments](#download-email-attachments) * [Download attachments](#download-attachments)
* [Read email](#read-email) * [Read a message](#read-a-message)
* [Reply email](#reply-email) * [Write a new message](#write-a-new-message)
* [Forward email](#forward-email) * [Reply to a message](#reply-to-a-message)
* [Forward a message](#forward-a-message)
* [License](https://github.com/soywod/himalaya/blob/master/LICENSE) * [License](https://github.com/soywod/himalaya/blob/master/LICENSE)
* [Changelog](https://github.com/soywod/himalaya/blob/master/CHANGELOG.md) * [Changelog](https://github.com/soywod/himalaya/blob/master/CHANGELOG.md)
* [Credits](#credits) * [Credits](#credits)
## Motivation ## Motivation
Bringing emails to your terminal is a pain. The mainstream TUI, (neo)mutt, Bringing emails to the terminal is a pain. The mainstream TUI, (neo)mutt, takes
takes time to configure. The default mapping is not intuitive when coming from time to configure. The default mapping is not intuitive when coming from the
the Vim environment. It is even scary to use at the beginning, since you are Vim environment. It is even scary to use at the beginning, since you are
dealing with sensitive data! dealing with sensitive data!
The aim of Himalaya is to extract the email logic into a simple CLI API that The aim of Himalaya is to extract the email logic into a simple CLI API that
can be used either directly for the terminal or from various interfaces. It can be used either directly from the terminal or from interfaces. It gives
gives users more flexibility. users more flexibility.
## Installation ## Installation
@ -46,7 +48,7 @@ more information.*
# ~/.config/himalaya/config.toml # ~/.config/himalaya/config.toml
name = "Your full name" name = "Your full name"
downloads_dir = "/abs/path/to/downloads" downloads-dir = "/abs/path/to/downloads"
# Himalaya supports the multi-account # Himalaya supports the multi-account
# Each account should be inside a TOML section # Each account should be inside a TOML section
@ -54,32 +56,32 @@ downloads_dir = "/abs/path/to/downloads"
default = true default = true
email = "my.email@gmail.com" email = "my.email@gmail.com"
imap_host = "imap.gmail.com" imap-host = "imap.gmail.com"
imap_port = 993 imap-port = 993
imap_login = "p.durant@gmail.test.com" imap-login = "test@gmail.com"
imap_passwd_cmd = "pass show gmail" imap-passwd_cmd = "pass show gmail"
smtp_host = "smtp.gmail.com" smtp-host = "smtp.gmail.com"
smtp_port = 487 smtp-port = 487
smtp_login = "p.durant@gmail.test.com" smtp-login = "test@gmail.com"
smtp_passwd_cmd = "pass show gmail" smtp-passwd_cmd = "pass show gmail"
[posteo] [posteo]
name = "Your overriden full name" name = "Your overriden full name"
downloads_dir = "/abs/path/to/overriden/downloads" downloads-dir = "/abs/path/to/overriden/downloads"
email = "my.email@posteo.net" email = "test@posteo.net"
imap_host = "posteo.de" imap-host = "posteo.de"
imap_port = 993 imap-port = 993
imap_login = "my.email@posteo.net" imap-login = "test@posteo.net"
imap_passwd_cmd = "security find-internet-password -gs posteo -w" imap-passwd_cmd = "security find-internet-password -gs posteo -w"
smtp_host = "posteo.de" smtp-host = "posteo.de"
smtp_port = 487 smtp-port = 487
smtp_login = "my.email@posteo.net" smtp-login = "test@posteo.net"
smtp_passwd_cmd = "security find-internet-password -gs posteo -w" smtp-passwd_cmd = "security find-internet-password -gs posteo -w"
# [other account] # [other accounts]
# ... # ...
``` ```
@ -101,7 +103,8 @@ FLAGS:
-V, --version Prints version information -V, --version Prints version information
OPTIONS: OPTIONS:
-a, --account <STRING> Name of the config file to use -a, --account <STRING> Name of the account to use
-o, --output <STRING> Format of the output to print [default: text] [possible values: text, json]
SUBCOMMANDS: SUBCOMMANDS:
attachments Downloads all attachments from an email attachments Downloads all attachments from an email
@ -111,7 +114,10 @@ SUBCOMMANDS:
mailboxes Lists all available mailboxes mailboxes Lists all available mailboxes
read Reads text bodies of an email read Reads text bodies of an email
reply Answers to an email reply Answers to an email
save Saves a raw message in the given mailbox
search Lists emails matching the given IMAP query search Lists emails matching the given IMAP query
send Sends a raw message
template Generates a message template
write Writes a new email write Writes a new email
``` ```
@ -120,182 +126,80 @@ information.*
### List mailboxes ### List mailboxes
Shows mailboxes in a basic table.
![image](https://user-images.githubusercontent.com/10437171/104848169-0e432000-58e4-11eb-8410-05f0404c0d99.png) ![image](https://user-images.githubusercontent.com/10437171/104848169-0e432000-58e4-11eb-8410-05f0404c0d99.png)
```
himalaya-mailboxes
Lists all available mailboxes
USAGE:
himalaya mailboxes
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
```
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:mailboxes) *See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:mailboxes)
for more information.* for more information.*
### List emails ### List messages
Shows messages in a basic table.
![image](https://user-images.githubusercontent.com/10437171/104848096-aee51000-58e3-11eb-8d99-bcfab5ca28ba.png) ![image](https://user-images.githubusercontent.com/10437171/104848096-aee51000-58e3-11eb-8d99-bcfab5ca28ba.png)
```
himalaya-list
Lists emails sorted by arrival date
USAGE:
himalaya list [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-m, --mailbox <STRING> Name of the mailbox [default: INBOX]
-p, --page <INT> Page number [default: 0]
-s, --size <INT> Page size [default: 10]
```
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:list) for *See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:list) for
more information.* more information.*
### Search emails ### Search messages
![image](https://user-images.githubusercontent.com/10437171/104848096-aee51000-58e3-11eb-8d99-bcfab5ca28ba.png) Shows filtered messages in a basic table. The query should follow the
[RFC-3501](https://tools.ietf.org/html/rfc3501#section-6.4.4).
``` ![image](https://user-images.githubusercontent.com/10437171/110698977-9d86f880-81ee-11eb-8990-0ca89c7d4640.png)
himalaya-search
Lists emails matching the given IMAP query
USAGE:
himalaya search [OPTIONS] <QUERY>...
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-m, --mailbox <STRING> Name of the mailbox [default: INBOX]
-p, --page <INT> Page number [default: 0]
-s, --size <INT> Page size [default: 10]
ARGS:
<QUERY>... IMAP query (see https://tools.ietf.org/html/rfc3501#section-6.4.4)
```
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:search) for *See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:search) for
more information.* more information.*
### Download email attachments ### Download attachments
Downloads attachments in the [`downloads-dir`](#configuration).
![image](https://user-images.githubusercontent.com/10437171/104848278-890c3b00-58e4-11eb-9b5c-48807c04f762.png) ![image](https://user-images.githubusercontent.com/10437171/104848278-890c3b00-58e4-11eb-9b5c-48807c04f762.png)
```
himalaya-attachments
Downloads all attachments from an email
USAGE:
himalaya attachments [OPTIONS] <UID>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-m, --mailbox <STRING> Name of the mailbox [default: INBOX]
ARGS:
<UID> UID of the email
```
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:attachments) *See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:attachments)
for more information.* for more information.*
### Read email ### Read a message
``` Shows the text content of a message (`text/plain` if exists, otherwise
himalaya-read `text/html`).
Reads text bodies of an email
USAGE: ![image](https://user-images.githubusercontent.com/10437171/110701369-5d754500-81f1-11eb-932f-94c2ca8db068.png)
himalaya read [OPTIONS] <UID>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-m, --mailbox <STRING> Name of the mailbox [default: INBOX]
-t, --mime-type <STRING> MIME type to use [default: plain] [possible values: plain, html]
ARGS:
<UID> UID of the email
```
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:read) for *See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:read) for
more information.* more information.*
### Write email ### Write a new message
``` Opens your default editor (from the `$EDITOR` environment variable) to compose
himalaya-write a new message.
Writes a new email
USAGE: ```bash
himalaya write himalaya write
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
``` ```
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:write) for *See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:write) for
more information.* more information.*
### Reply email ### Reply to a message
``` Opens your default editor to reply to a message.
himalaya-reply
Answers to an email
USAGE: ```bash
himalaya reply [FLAGS] [OPTIONS] <UID> himalaya reply --all 5123
FLAGS:
-h, --help Prints help information
-a, --all Includs all recipients
-V, --version Prints version information
OPTIONS:
-m, --mailbox <STRING> Name of the mailbox [default: INBOX]
ARGS:
<UID> UID of the email
``` ```
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:reply) for *See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:reply) for
more information.* more information.*
### Forward email ### Forward a message
``` Opens your default editor to forward a message.
himalaya-forward
Forwards an email
USAGE: ```bash
himalaya forward [OPTIONS] <UID> himalaya forward 5123
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-m, --mailbox <STRING> Name of the mailbox [default: INBOX]
ARGS:
<UID> UID of the email
``` ```
*See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:forward) for *See [wiki section](https://github.com/soywod/himalaya/wiki/Usage:forward) for
@ -306,5 +210,6 @@ more information.*
- [IMAP RFC3501](https://tools.ietf.org/html/rfc3501) - [IMAP RFC3501](https://tools.ietf.org/html/rfc3501)
- [Iris](https://github.com/soywod/iris.vim), the himalaya predecessor - [Iris](https://github.com/soywod/iris.vim), the himalaya predecessor
- [Neomutt](https://neomutt.org/) - [Neomutt](https://neomutt.org/)
- [mutt-wizard](https://github.com/LukeSmithxyz/mutt-wizard)
- [Alpine](http://alpine.x10host.com/alpine/alpine-info/) - [Alpine](http://alpine.x10host.com/alpine/alpine-info/)
- [rust-imap](https://github.com/jonhoo/rust-imap) - [rust-imap](https://github.com/jonhoo/rust-imap)