SkillAgentSearch skills...

Himalaya

CLI to manage emails

Install / Use

/learn @pimalaya/Himalaya
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<div align="center"> <img src="./logo.svg" alt="Logo" width="128" height="128" /> <h1>📫 Himalaya</h1> <p>CLI to manage emails</p> <p> <a href="https://github.com/pimalaya/himalaya/releases/latest"><img alt="Release" src="https://img.shields.io/github/v/release/pimalaya/himalaya?color=success"/></a> <a href="https://repology.org/project/himalaya/versions"><img alt="Repology" src="https://img.shields.io/repology/repositories/himalaya?color=success"></a> <a href="https://matrix.to/#/#pimalaya:matrix.org"><img alt="Matrix" src="https://img.shields.io/badge/chat-%23pimalaya-blue?style=flat&logo=matrix&logoColor=white"/></a> <a href="https://fosstodon.org/@pimalaya"><img alt="Mastodon" src="https://img.shields.io/badge/news-%40pimalaya-blue?style=flat&logo=mastodon&logoColor=white"/></a> </p> </div>
himalaya envelope list --account posteo --folder Archives.FOSS --page 2

screenshot

Table of contents

Features

  • Multi-accounting configuration:
    • interactive via wizard (requires wizard feature)
    • manual via TOML-based configuration file (see ./config.sample.toml)
  • Message composition based on $EDITOR
  • IMAP backend (requires imap feature)
  • Maildir backend (requires maildir feature)
  • Notmuch backend (requires notmuch feature)
  • SMTP backend (requires smtp feature)
  • Sendmail backend (requires sendmail feature)
  • Global system keyring for secret management (requires keyring feature)
  • OAuth 2.0 authorization flow (requires oauth2 feature)
  • JSON output via --output json
  • PGP encryption:
    • via shell commands (requires pgp-commands feature)
    • via GPG bindings (requires pgp-gpg feature)
    • via native implementation (requires pgp-native feature)

Himalaya CLI is written in Rust, and relies on cargo features to enable or disable functionalities. Default features can be found in the features section of the Cargo.toml, or on docs.rs.

Installation

Pre-built binary

Himalaya CLI can be installed with the install.sh installer:

As root:

curl -sSL https://raw.githubusercontent.com/pimalaya/himalaya/master/install.sh | sudo sh

As a regular user:

curl -sSL https://raw.githubusercontent.com/pimalaya/himalaya/master/install.sh | PREFIX=~/.local sh

These commands install the latest binary from the GitHub releases section.

If you want a more up-to-date version than the latest release, check out the releases GitHub workflow and look for the Artifacts section. You will find a pre-built binary matching your OS. These pre-built binaries are built from the master branch.

Such binaries are built with the default cargo features. If you need more features, please use another installation method.

Cargo

Himalaya CLI can be installed with cargo:

cargo install himalaya --locked

With only IMAP support:

cargo install himalaya --locked --no-default-features --features imap

You can also use the git repository for a more up-to-date (but less stable) version:

cargo install --locked --git https://github.com/pimalaya/himalaya.git

Arch Linux

Himalaya CLI can be installed on Arch Linux with either the community repository:

pacman -S himalaya

or the user repository:

git clone https://aur.archlinux.org/himalaya-git.git
cd himalaya-git
makepkg -isc

If you use yay, it is even simplier:

yay -S himalaya-git

Homebrew

Himalaya CLI can be installed with Homebrew:

brew install himalaya

Note: cargo features are not compatible with brew. If you need features like OAuth 2.0, please use a different installation method.

Scoop

Himalaya CLI can be installed with Scoop:

scoop install himalaya

Fedora Linux/CentOS/RHEL

Himalaya CLI can be installed on Fedora Linux/CentOS/RHEL via COPR repo:

dnf copr enable atim/himalaya
dnf install himalaya

Nix

Himalaya CLI can be installed with Nix:

nix-env -i himalaya

You can also use the git repository for a more up-to-date (but less stable) version:

nix-env -if https://github.com/pimalaya/himalaya/archive/master.tar.gz

Or, from within the source tree checkout:

nix-env -if .

If you have the Flakes feature enabled:

nix profile install himalaya

Or, from within the source tree checkout:

nix profile install

You can also run Himalaya directly without installing it:

nix run himalaya

Sources

Himalaya CLI can be installed from sources.

First you need to install the Rust development environment (see the rust installation documentation):

curl https://sh.rustup.rs -sSf | sh

Then, you need to clone the repository and install dependencies:

git clone https://github.com/pimalaya/himalaya.git
cd himalaya
cargo check

Now, you can build Himalaya:

cargo build --release

Binaries are available under the target/release folder.

Configuration

Just run himalaya, the wizard will help you to configure your default account.

Accounts can be (re)configured via the wizard using the command himalaya account configure <name>.

You can also manually edit your own configuration, from scratch:

  • Copy the content of the documented ./config.sample.toml
  • Paste it in a new file ~/.config/himalaya/config.toml
  • Edit, then comment or uncomment the options you want

Proton Mail

When using Proton Bridge, emails are synchronized locally and exposed via a local IMAP/SMTP server. This implies 2 things:

  • Id order may be reversed or shuffled, but envelopes will still be sorted by date.
  • SSL/TLS needs to be deactivated manually.
  • The password to use is the one generated by Proton Bridge, not the one from your Proton Mail account.
[accounts.proton]
email = "example@proton.me"

backend.type = "imap"
backend.host = "127.0.0.1"
backend.port = 1143
backend.encryption.type = "none"
backend.login = "example@proton.me"
backend.auth.type = "password"
backend.auth.raw = "*****"

message.send.backend.type = "smtp"
message.send.backend.host = "127.0.0.1"
message.send.backend.port = 1025
message.send.backend.encryption.type = "none"
message.send.backend.login = "example@proton.me"
message.send.backend.auth.type = "password"
message.send.backend.auth.raw = "*****"

If you still want to use TLS, you need to export the certificate generated by Proton Bridge, then give it to Himalaya:

backend.encryption.type = "start-tls"
backend.encryption.cert = "/path/to/exported/cert.pem"

message.send.backend.encryption.type = "start-tls"
message.send.backend.encryption.cert = "/path/to/exported/cert.pem"

Keeping your password inside the configuration file is good for testing purpose, but it is not safe. You have 2 better alternatives:

  • Save your password in any password manager that can be queried via the CLI:

    backend.auth.cmd = "pass show proton"
    
  • Use the global keyring of your system (requires the keyring cargo feature):

    backend.auth.keyring = "proton-example"
    

    Running himalaya account configure proton will ask for your IMAP password, just paste the one generated previously.

Gmail

Google passwords cannot be used directly. There is two ways to authenticate yourself:

Using App Passwords

This option is the simplest and the fastest. First, be sure that:

  • IMAP is enabled
  • Two-step authentication is enabled
  • Less secure app access is enabled

First create a dedicated password for Himalaya.

[accounts.gmail]
email = "example@gmail.com"

folder.aliases.inbox = "INBOX"
folder.aliases.sent = "[Gmail]/Sent Mail"
folder.aliases.drafts = "[Gmail]/Drafts"
folder.aliases.trash = "[Gmail]/Trash"

backend.type = "imap"
backend.host = "imap.gmail.com"
backend.port = 993
backend.login = "example@gmail.com"
backend.auth.type = "password"
backend.auth.raw = "*****"

message.send.backend.type = "smtp"
message.send.backend.host = "smtp.gmail.com"
message.send.backend.port = 465
message.send.backend.login = "example@gmail.com"
message.send.backend.auth.type = "password"
message.send.backend.auth.cmd = "*****"

Keeping your password inside the configuration file is good for testing purpose, but it is not safe. You have 2 better alternatives:

  • Save your password in any password manager that can be queried via the CLI:

    backend.auth.cmd = "pass show gmail"
    
  • Use the global keyring of your system (requires the keyring cargo feature):

    backend.auth.keyring = "gmail-example"
    

    Running himalaya configure -a gmail wil

Related Skills

View on GitHub
GitHub Stars5.8k
CategoryDevelopment
Updated1m ago
Forks169

Languages

Rust

Security Score

100/100

Audited on Mar 28, 2026

No findings