Loading...
Loading...
Himalaya CLI: IMAP/SMTP email from terminal.
npx skill4agent add nousresearch/hermes-agent himalayahimalayareferences/configuration.mdreferences/message-composition.mdhimalaya --version~/.config/himalaya/config.toml# Pre-built binary (Linux/macOS — recommended)
curl -sSL https://raw.githubusercontent.com/pimalaya/himalaya/master/install.sh | PREFIX=~/.local sh
# macOS via Homebrew
brew install himalaya
# Or via cargo (any platform with Rust)
cargo install himalaya --lockedhimalaya account configure~/.config/himalaya/config.toml[accounts.personal]
email = "you@example.com"
display-name = "Your Name"
default = true
backend.type = "imap"
backend.host = "imap.example.com"
backend.port = 993
backend.encryption.type = "tls"
backend.login = "you@example.com"
backend.auth.type = "password"
backend.auth.cmd = "pass show email/imap" # or use keyring
message.send.backend.type = "smtp"
message.send.backend.host = "smtp.example.com"
message.send.backend.port = 587
message.send.backend.encryption.type = "start-tls"
message.send.backend.login = "you@example.com"
message.send.backend.auth.type = "password"
message.send.backend.auth.cmd = "pass show email/smtp"
# Folder aliases (himalaya v1.2.0+ syntax). Required whenever the
# server's folder names don't match himalaya's canonical names
# (inbox/sent/drafts/trash). Gmail is the common case — see
# `references/configuration.md` for the `[Gmail]/Sent Mail` mapping.
folder.aliases.inbox = "INBOX"
folder.aliases.sent = "Sent"
folder.aliases.drafts = "Drafts"
folder.aliases.trash = "Trash"Heads up on the alias syntax. Pre-v1.2.0 docs used asub-section (singular[accounts.NAME.folder.alias]). v1.2.0 silently ignores that form — TOML parses fine, but the alias resolver never reads it, so every lookup falls through to the canonical name. On Gmail this means save-to-Sent fails after SMTP delivery succeeds, andaliasexits non-zero. Any caller (agent, script, user) that retries on that exit code will re-run the entire send — including SMTP — producing duplicate emails to recipients. Always usehimalaya message send(plural, dotted keys, directly underfolder.aliases.X).[accounts.NAME]
cat << EOF | himalaya template send$EDITORpty=true--output jsonhimalaya account configureterminal(command="himalaya account configure", pty=true)himalaya folder listhimalaya envelope listhimalaya envelope list --folder "Sent"himalaya envelope list --page 1 --page-size 20himalaya envelope list from john@example.com subject meetinghimalaya message read 42himalaya message export 42 --full# Get the reply template, edit it, and send
himalaya template reply 42 | sed 's/^$/\nYour reply text here\n/' | himalaya template sendcat << 'EOF' | himalaya template send
From: you@example.com
To: sender@example.com
Subject: Re: Original Subject
In-Reply-To: <original-message-id>
Your reply here.
EOFhimalaya message reply 42 --all# Get forward template and pipe with modifications
himalaya template forward 42 | sed 's/^To:.*/To: newrecipient@example.com/' | himalaya template sendcat << 'EOF' | himalaya template send
From: you@example.com
To: recipient@example.com
Subject: Test Message
Hello from Himalaya!
EOFhimalaya message write -H "To:recipient@example.com" -H "Subject:Test" "Message body here"himalaya message write$EDITORpty=truehimalaya message move 42 "Archive"himalaya message copy 42 "Important"himalaya message delete 42himalaya flag add 42 --flag seenhimalaya flag remove 42 --flag seenhimalaya account listhimalaya --account work envelope listhimalaya attachment download 42himalaya attachment download 42 --dir ~/Downloads--outputhimalaya envelope list --output json
himalaya envelope list --output plainRUST_LOG=debug himalaya envelope listRUST_LOG=trace RUST_BACKTRACE=1 himalaya envelope listhimalaya --helphimalaya <command> --helpreferences/message-composition.mdpass