Summary
Integrate himalaya CLI email client into flow-cli with ADHD-friendly shell wrappers, fzf-powered email browsing, smart rendering, and desktop notifications.
Architecture: himalaya → email-oauth2-proxy (localhost) → Office 365 (OAuth2)
Proposed Features
1. Core Email Aliases
| Alias |
Command |
Purpose |
hm |
himalaya |
Base command |
hml |
himalaya envelope list |
List inbox |
hmr |
himalaya message read |
Read message |
hmw |
himalaya message write |
Compose |
hmf |
himalaya folder list |
List folders |
hms |
himalaya envelope list -f 'Sent Items' |
Sent mail |
2. Shell Functions
hminbox [N] — Quick inbox check (default 25)
hmunread — Unread count
hmread <ID> — Read with bat syntax highlighting + paging
hmhtml <ID> — Render HTML email via w3m
hmpick [FOLDER] — fzf interactive email picker with preview
hmreply <ID> — Quick reply
hmattach <ID> — Download attachments
hmfind <query> — Search and browse
hmdash — Dashboard (unread count + latest 10)
3. fzf Integration
- Email picker with preview pane (
hmpick)
- Folder browser (
hfolder)
- Search with fzf preview (
hsearch)
- JSON-powered rich display mode (
hpick_json)
4. Smart Rendering Pipeline
- Auto-detect HTML vs plaintext content
- HTML → w3m rendering
- Markdown → glow rendering
- Fallback → bat syntax highlighting
- Combined in
hpage() smart pager function
5. Notification Integration
himalaya envelope watch with built-in IMAP IDLE hooks
terminal-notifier poll-based fallback (LaunchAgent)
- Optional: Mirador (Pimalaya ecosystem watcher)
6. Config Display Enhancements
- Color theme (Tokyo Night inspired): cyan subjects, blue senders, magenta flags
- UTF8 table preset for box-drawing characters
- Friendlier datetime format (
%b %d %H:%M)
- Custom flag characters (
+ unread, ! flagged, @ attachment)
Dependencies
| Tool |
Install |
Required? |
| himalaya |
cargo install himalaya |
Yes |
| w3m |
brew install w3m |
Recommended (HTML rendering) |
| bat |
brew install bat |
Recommended (paging) |
| glow |
brew install glow |
Optional (Markdown rendering) |
| fzf |
brew install fzf |
Recommended (interactive picker) |
| jq |
brew install jq |
Recommended (JSON processing) |
| terminal-notifier |
brew install terminal-notifier |
Optional (notifications) |
| urlscan |
brew install urlscan |
Optional (URL extraction) |
Implementation Plan
Quick Wins
- Add core aliases to
zsh/aliases/
- Add color/display config to himalaya
config.toml
- Install w3m + bat
Medium Effort
- Build fzf email picker functions in
zsh/functions/
- Set up
envelope watch with notification hooks
- Create smart rendering pipeline (
hpage)
Long-term
- Neverest + Notmuch for offline full-text search
- LaunchAgent for poll-based notifications
- Integration with
dash command (email section in master dashboard)
- Integration with
work command (email context per project)
Full Research Document
Complete research with code examples, config references, community discussion, and tool comparisons:
📎 DISPLAY-ENHANCEMENTS.md
Covers: plugin ecosystem, HTML rendering, pager integration, fzf integration, Notmuch backend, MML/MIME handling, wrapper scripts, config display options, TUI frontends, email notifications, neomutt/aerc comparison, and community discussions.
Context
- Email setup: UNM LoboMail (Microsoft 365) via email-oauth2-proxy (device code flow)
- Proxy runs as launchd service (
com.emailproxy)
- Config:
~/.config/himalaya/config.toml
- Tutorial:
~/.config/himalaya/TUTORIAL.md
Summary
Integrate himalaya CLI email client into flow-cli with ADHD-friendly shell wrappers, fzf-powered email browsing, smart rendering, and desktop notifications.
Architecture: himalaya → email-oauth2-proxy (localhost) → Office 365 (OAuth2)
Proposed Features
1. Core Email Aliases
hmhimalayahmlhimalaya envelope listhmrhimalaya message readhmwhimalaya message writehmfhimalaya folder listhmshimalaya envelope list -f 'Sent Items'2. Shell Functions
hminbox [N]— Quick inbox check (default 25)hmunread— Unread counthmread <ID>— Read with bat syntax highlighting + paginghmhtml <ID>— Render HTML email via w3mhmpick [FOLDER]— fzf interactive email picker with previewhmreply <ID>— Quick replyhmattach <ID>— Download attachmentshmfind <query>— Search and browsehmdash— Dashboard (unread count + latest 10)3. fzf Integration
hmpick)hfolder)hsearch)hpick_json)4. Smart Rendering Pipeline
hpage()smart pager function5. Notification Integration
himalaya envelope watchwith built-in IMAP IDLE hooksterminal-notifierpoll-based fallback (LaunchAgent)6. Config Display Enhancements
%b %d %H:%M)+unread,!flagged,@attachment)Dependencies
cargo install himalayabrew install w3mbrew install batbrew install glowbrew install fzfbrew install jqbrew install terminal-notifierbrew install urlscanImplementation Plan
Quick Wins
zsh/aliases/config.tomlMedium Effort
zsh/functions/envelope watchwith notification hookshpage)Long-term
dashcommand (email section in master dashboard)workcommand (email context per project)Full Research Document
Complete research with code examples, config references, community discussion, and tool comparisons:
📎 DISPLAY-ENHANCEMENTS.md
Covers: plugin ecosystem, HTML rendering, pager integration, fzf integration, Notmuch backend, MML/MIME handling, wrapper scripts, config display options, TUI frontends, email notifications, neomutt/aerc comparison, and community discussions.
Context
com.emailproxy)~/.config/himalaya/config.toml~/.config/himalaya/TUTORIAL.md