Himalaya

CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search

Himalaya is a community skill for email management via IMAP and SMTP protocols, covering inbox listing, message reading, email composition, reply operations, and folder organization for terminal-based email workflows.

What Is This?

Overview

Himalaya provides a command-line interface for managing email accounts through standard IMAP and SMTP protocols. It covers inbox listing that displays messages with subject lines, senders, and timestamps in a terminal table format, message reading that fetches full email content including headers and body text, email composition that creates new messages with attachments and formatting support, reply and forward operations that handle message threading and quoted content properly, and folder organization that moves messages between mailboxes and applies labels. The skill helps users manage email entirely from the terminal without opening web browsers or graphical email clients, providing a lightweight alternative to heavyweight desktop applications. It supports multiple account configurations and handles both modern OAuth and traditional password authentication methods for compatibility with various email providers, including Gmail, Outlook, Fastmail, and self-hosted mail servers.

Who Should Use This

This skill serves developers who prefer terminal-based workflows over graphical interfaces, system administrators managing multiple email accounts from servers, and AI agents requiring programmatic email access. It is particularly valuable for users who spend the majority of their working time in a terminal environment and want to avoid context switching.

Why Use It?

Problems It Solves

Opening graphical email clients or web browsers breaks concentration during terminal-focused work sessions. Managing multiple email accounts across different providers requires switching between various interfaces and authentication contexts. Automating email workflows through raw IMAP and SMTP libraries requires complex protocol handling code for connection management, authentication sequences, message parsing, and error recovery. Manual email management at scale becomes infeasible when dealing with hundreds of messages daily across multiple accounts. Server environments and remote SSH sessions lack graphical display capabilities for running traditional email clients.

Core Highlights

Email lister displays inbox messages in terminal tables with filtering options. Message reader fetches complete email content including attachments. Composer creates new emails with subject, body, recipients, and file attachments. Folder manager moves messages and organizes mailboxes programmatically. All operations are scriptable, making them suitable for integration into automated pipelines and scheduled tasks.

How to Use It?

Basic Usage

himalaya list

himalaya read 42

himalaya write

himalaya reply 42

himalaya search \
  "from:alice@example.com"

Real-World Examples

himalaya list \
  --page 1 \
  --filter unseen

himalaya write \
  --to team@company.com \
  --subject "Weekly Report" \
  --body report.txt \
  --attachment data.csv

himalaya move 42 Archive

himalaya forward 42 \
  --to manager@company.com

Advanced Tips

Configure multiple email accounts in the Himalaya config file to switch between work and personal accounts seamlessly using profile management features. Himalaya stores account credentials and server settings persistently, eliminating repetitive authentication steps. Use search filters with date ranges, such as filtering messages received within the last seven days, to find specific emails quickly. Pipe message content to other command-line tools such as grep, awk, or jq for automated processing workflows. Combining Himalaya with cron jobs enables scheduled inbox monitoring and automated response handling without manual intervention.

When to Use It?

Use Cases

Manage email from remote servers and SSH sessions where graphical clients are unavailable. Automate email processing tasks with shell scripts that read, filter, and respond to messages. Integrate email notifications into terminal workflows and command-line automation pipelines.

Related Topics

IMAP protocol, SMTP protocol, terminal email clients, command-line productivity, email automation, and remote server management.

Important Notes

Requirements

Valid IMAP and SMTP server credentials configured in the Himalaya configuration file. Network access to email servers for sending and receiving messages. The Himalaya CLI tool installed and available in your system PATH.

Usage Recommendations

Do: configure account credentials securely using the config file rather than passing them as command-line arguments. Test commands with read operations before running destructive operations like delete or move. Use the search feature to filter messages before processing large mailboxes.

Don't: store plain-text passwords in configuration files when keyring integration is available. Leave large attachments in the inbox without organizing them into folders. Run bulk operations without first verifying the target messages with a list command.

Limitations

Some email providers require app-specific passwords or OAuth authentication that may need additional configuration. Very large attachments may take significant time to download over slow network connections. Terminal display limitations affect the rendering of HTML emails and complex formatting.