CLI-Inbox banner

CLI-Inbox

7 devlogs
15h 45m 15s

A CLI application Email client, written in Python, that supports Gmail for now, using IMAP + SMTP ye

artur33

Added/Fixed:

  • Parses HTML email parts while preserving the raw HTML content + generates a plain text fallback using the ‘html2text’ library
  • New ‘open’ command that opens an email (HTML or text) in the system browser (allowing proper viewing of complex HTML emails when the terminal view is baddd)
  • Composer modified for reply editor: now prefills quoted content from the original message
  • New ‘forward’ command to forward emails (automatically includes original message content)
  • Minor internal fixes

Note: Initially I planned to use the w3m CLI browser to render HTML emails directly in the terminal, but nothing was really working properly. In the end I went with two separate approaches: terminal display uses ‘html2text’, and the new ‘open’ command allows viewing the full HTML version in the browser.

Next:

  • Attachment download and send
  • Threaded email view
  • Account management
  • Settings
Attachment
Attachment
Attachment
1

Comments

Cyber Ninja
Cyber Ninja about 8 hours ago

cool project

artur33

Added/Fixed:

  • Commands (‘next’/‘prev’/‘page’) to navigate between pages for now it’s still 20 emails per page (will do settings laterrr)
  • Star and unstar emails
  • Mark emails as unread
  • Delete emails (moves to trash)
  • Archive emails DOESN’T WORK FOR SOME REASONN I will fix in the next devlog if I can bruh
  • Automatically detects default labels used (this is because of different languages problems)
  • Shows “To” field when viewing sent emails
  • Starred messages visually highlighted in the inbox + star collumn
  • Prevents occasional decode errors when parsing messages
  • Fixed some other problems and sidebar now displays as the same height as the email part of the layout

Note: this took some time because of the ‘archive’ problem and some “gmail language” problems, hm (that’s why I added the default labels func and dict)…

Next:

  • Display HTML emails properly
  • Attachment download and send
  • Account management
  • Settings
0
artur33

Added/Fixed:

  • Email search functionality implemented (search results update the active message list)
  • New ‘search’ command
  • Labels now integrated directly into the main inbox view layout (responsive for wider terminals)
  • Small layout and rendering fixes

Next:

  • Star, delete, archive and mark unread actions
  • Display HTML emails properly
  • Attachment download and send
  • Account management
  • Settings
Attachment
0
artur33

Added/Fixed:

  • Label support implemented (lists available labels over the inbox, switching between labels using the ‘label’ command + fixed all the million IMAP problems -> that’s because I’m baka dev, the fix was easy, just separating the ‘name’ and ‘display’ in get_labels func…)
  • Message flags now fetched from IMAP
  • Unread emails are now bold in the UI inbox
  • Emails automatically marked as “seen” when opened
  • Threaded reply fixes (but still incomplete) (replying to emails preserves parent references)
  • Minor rendering improvements in the inbox and other stuff

Next:

  • Email search functionality
  • Star, delete, archive and mark unread actions
  • How can I display HTML emails…?
0
artur33

Added/Fixed:

  • Email compose functionality implemented (interactive terminal editor to write new emails (used prompt_toolkit library))
  • SMTP integration for sending emails
  • Reply support added (automatically fills recipient and subject)
  • Message IDs now displayed in inbox listing
  • Screen clears before commands for a TUI-like flow

Next:

  • Switch between Inbox, Sent, Spam, ecc.
  • Read indicators and behaviour
  • Email search functionality ye
0
artur33

Added/Fixed:

  • Inbox and email UI rendering using the “rich” library (table layout and formatted email display) (ui.py)
  • Inbox fetch limit increased (I’ll need to make a setting for this)
  • New ‘view’ command to open a specific email by ID
  • Email parsing improvements
  • Date formatting func

Note: I discovered the “rich” library while working on the UI and… wow, it saves a lot of time for tables. Feels much more polished with very little effort… incredible, why I haven’t discovered it earlier bruhh :/

Next:

  • Add compose and send email functionality (with SMTP)
  • Switch between Inbox, Sent, Spam, ecc.
Attachment
0
artur33

Note: This project started as a small experiment to see how practical a CLI email client could be lol, I don’t have much time left so I think I will need to grind it, ehe

Added/Fixed:

  • Basic project structure split into modules (main, mail, auth and utils)
  • Simple command loop with command parsing (basically the same as one of my previous projects)
  • Gmail IMAP integration
  • Account setup flow added for first run (Email and password are stored securely using the system keychain (via the ‘keyring’ Python library), and the credentials automatically load on subsequent runs.
  • Login using Google App Passwords
  • Inbox basic fetching implemented (retrieves the latest emails from the inbox (for testing noww))
  • Colored status messages (info, success, error)
  • Other minor additions

Next:

  • Implement a proper UI to display the inbox
  • Add compose and send email functionality (with SMTP)
Attachment
0