# Himalaya: A Powerful CLI Tool for Email Management in Your Terminal

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/pimalaya-himalaya
Generated for open source discovery and AI-assisted research.

Himalaya is a robust command-line interface (CLI) tool designed for managing emails directly from your terminal. Built with Rust, it offers multi-accounting, PGP encryption, OAuth 2.0 support, and various backend integrations like IMAP, SMTP, Maildir, and Notmuch, providing a flexible and efficient way to handle your correspondence. This tool distinguishes itself by offering a stateless, command-line approach, ideal for scripting and integration into existing workflows.

GitHub: https://github.com/pimalaya/himalaya
OSRepos URL: https://osrepos.com/repo/pimalaya-himalaya

## Summary

Himalaya is a robust command-line interface (CLI) tool designed for managing emails directly from your terminal. Built with Rust, it offers multi-accounting, PGP encryption, OAuth 2.0 support, and various backend integrations like IMAP, SMTP, Maildir, and Notmuch, providing a flexible and efficient way to handle your correspondence. This tool distinguishes itself by offering a stateless, command-line approach, ideal for scripting and integration into existing workflows.

## Topics

- cli
- email
- rust
- imap
- smtp
- pgp
- terminal
- email client

## Repository Information

Last analyzed by OSRepos: Sun Oct 12 2025 04:00:40 GMT+0100 (Western European Summer Time)
Detail views: 16
GitHub clicks: 4

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

Himalaya is a powerful, Rust-based command-line interface (CLI) tool designed for efficient email management directly from your terminal. Unlike traditional Terminal User Interfaces (TUIs) that lock your terminal into an event loop, Himalaya operates in a stateless manner, allowing you to interact with your emails using standard shell commands. It supports multi-accounting, various backends including IMAP, Maildir, Notmuch, SMTP, and Sendmail, and advanced features like PGP encryption and OAuth 2.0 authorization. Himalaya is built on `email-lib`, part of the broader Pimalaya project, aiming to provide robust Rust tools for email handling.

## Installation

Himalaya offers several convenient installation methods:

*   **Pre-built Binary**:
    bash
    curl -sSL https://raw.githubusercontent.com/pimalaya/himalaya/master/install.sh | sudo sh
    # Or for a regular user:
    curl -sSL https://raw.githubusercontent.com/pimalaya/himalaya/master/install.sh | PREFIX=~/.local sh
    
*   **Cargo**:
    bash
    cargo install himalaya
    # With specific features, e.g., only IMAP:
    cargo install himalaya --no-default-features --features imap
    
*   **Arch Linux**:
    bash
    pacman -S himalaya
    # Or via AUR with yay:
    yay -S himalaya-git
    
*   **Homebrew**:
    bash
    brew install himalaya
    
*   **Scoop**:
    bash
    scoop install himalaya
    
*   **Fedora Linux/CentOS/RHEL**:
    bash
    dnf copr enable atim/himalaya
    dnf install himalaya
    
*   **Nix**:
    bash
    nix-env -i himalaya
    
*   **From Sources**:
    bash
    git clone https://github.com/pimalaya/himalaya.git
    cd himalaya
    cargo build --release
    
    *(Binaries will be in `target/release`)*

## Examples

Interacting with Himalaya is straightforward using its command-line syntax.

**Listing Emails**:
To list envelopes from a specific account and folder:
bash
himalaya envelope list --account posteo --folder Archives.FOSS --page 2


**Composing Messages**:
Himalaya allows message composition using your `$EDITOR`. Messages are structured with headers (e.g., `From`, `To`, `Subject`) and a body, separated by an empty line. It supports plain text or the MIME Meta Language (MML) for rich content, including attachments.

Example of a plain text message:
eml
From: alice@localhost
To: Bob <bob@localhost>
Subject: Hello from Himalaya

Hello, world!


Example of a message with an attachment using MML:
eml
From: alice@localhost
To: bob@localhost
Subject: How to attach stuff

Regular binary attachment:
<#part filename=/path/to/file.pdf><#/part>

For more detailed examples, refer to the [MML documentation](https://github.com/pimalaya/core/tree/master/mml/examples).

## Why Use Himalaya

Himalaya stands out as an email client for several reasons:

*   **CLI-First Approach**: Its stateless command-line nature makes it highly scriptable and easily integratable into existing workflows, offering a distinct advantage over traditional TUI clients.
*   **Flexibility and Configuration**: Supports multi-accounting with interactive wizard setup or manual TOML-based configuration. It provides extensive options for managing various email services, including detailed guides for Proton Mail, Gmail, Outlook, and iCloud Mail.
*   **Comprehensive Backend Support**: Integrates seamlessly with IMAP, Maildir, Notmuch, SMTP, and Sendmail, ensuring compatibility with a wide range of email systems.
*   **Security Features**: Offers robust PGP encryption options (via shell commands, GPG bindings, or native implementation) and secure OAuth 2.0 authorization flows for services like Gmail and Outlook. It also supports global system keyring for secret management.
*   **Rust-Powered Performance**: Being written in Rust, Himalaya benefits from its performance, memory safety, and reliability.
*   **Extensible Ecosystem**: Serves as a foundation for other interfaces, with existing plugins for Vim, Emacs, and Raycast, demonstrating its adaptability.

## Links

*   **GitHub Repository**: [https://github.com/pimalaya/himalaya](https://github.com/pimalaya/himalaya){target="_blank"}
*   **Pimalaya Core MML Examples**: [https://github.com/pimalaya/core/tree/master/mml/examples](https://github.com/pimalaya/core/tree/master/mml/examples){target="_blank"}
*   **Vim Plugin**: [https://github.com/pimalaya/himalaya-vim](https://github.com/pimalaya/himalaya-vim){target="_blank"}
*   **Emacs Plugin**: [https://github.com/dantecatalfamo/himalaya-emacs](https://github.com/dantecatalfamo/himalaya-emacs){target="_blank"}
*   **Raycast Extension**: [https://www.raycast.com/jns/himalaya](https://www.raycast.com/jns/himalaya){target="_blank"}
*   **REPL Variant**: [https://github.com/pimalaya/himalaya-repl](https://github.com/pimalaya/himalaya-repl){target="_blank"}