CLI-Message banner

CLI-Message

12 devlogs
62h 47m 56s

A terminal-based messaging application written in Python. Chat in real time with friends and communities, all from your command line, through a TUI made with textual.

This project uses AI

[from README.md]
AI mainly used in specific cases where I was stuck and needed some help:
Live message updates
AI was consulted when implementing live chat refresh. The main issue was updating messages without showing the wrong content or forcing the full reload during conversations.
Light theme stylesheet
AI helped generate the initial version of the light theme stylesheet, which I later modified and adjusted as new UI elements were added.
Styling and CSS
Textual CSS caused several layout issues, so AI was occasionally used to help debug styling problems, especially around the servers/channels UI and profile panels.
General Bug fixes
AI was used for some bugs I could not resolve alone, including message ordering, widget state issues, terminal rendering problems, and other issues.
Documentation
The README was partially generated with AI and then edited for accuracy.
Used ChatGPT, Gemini and Github Copilot (for inline suggestions)

Demo Repository

Loading README...

artur33

Shipped this project!

Hours: 62.8
Cookies: šŸŖ 1548
Multiplier: 20.55 cookies/hr

After about a month of working on it, I’m shipping CLI-Message yay
It’s a Discord-like messaging app that runs in the terminal. You get servers with channels, direct messages, a friend request system, message replies, edits, and deletes, file attachments, image previews inside the chat, unread badges, mention notifications, presence indicators, profile customization (colors, bio, pronouns, banner, connections…), light/dark themes, a search system, and settings. All stored locally in SQLite, all inside a TUI built with Textual, hehe
Textual is genuinely interesting to work with, and at the start it felt surprisingly powerful for how fast things come together, but… then the CSS started misbehaving and I spent more time on layout bugs, yeah :( Small visual changes sometimes took way longer than expected, and Textual’s structure took a while to understand it.
The live message update system was one of the painful parts: a full chat reload looked awful when someone was actively chatting, but partial updates kept breaking in different ways (wrong message ordering, wrong user seeing the wrong chat, etc.). Message replies and edits were also a bit difficult: getting the reply references to render as proper quoted headers, the composer, oh… and then the edit profile system was probably the hardest devlog of the whole project: I actually started implementing it in a completely different way, scrapped an hour of work, and rewrote the whole thing. Styling that was, uhhhh, a lot, a lot of pain.
AI was used in a some places, the core logic was mostly written independently but yeah, I’m not gonna pretend I didn’t need help sometimes.
I’m proud that it actually works and feels like a real app, you can open multiple instances in separate terminals, create accounts, add friends, join servers, and chat in real time. That’s genuinely cool to me. I also tried to keep the codebase clean from the start, which made it way easier to keep building without getting completely lost.
There are probably still some bugs hiding there, it can feel a bit unstable in certain situations and I know that. But I have to ship it now :)
So, time to ship ship ship my last project for Flavortownnnnnnnnn yaaaaaaay

artur33

Added/Fixed:

  • Server leave flow implemented with backend logic and confirmation UI
  • Styling added for the ā€˜leave server’ stuff
  • Session system improved + removed a bug that was never closing the sessions on Ctrl+Q… But some stuff was not implemented [see the note]
  • Friend request actions (accept/decline) now restricted to the receiver to prevent unauthorized actions
  • Various UI fixes
  • Minor fixes and adjustments
  • Wrote the README (with AI help)
  • Added ā€˜requirements.txt’
  • Added banner and icon
  • Created the executable (with Pyinstaller ā€˜message.spec’)
  • Tested

Note: THIS IS THE FINAL DEVLOG FINALLYYYY yay yay yay yay yay yay yay yay yay yay yay yay
At this point I’ve done everything I realistically could for this project. I originally wanted to implement an auto-login system (basically the session verification system), but I also want the app to support multiple instances of the client running at the same time, and the way I structured sessions would make that messy and probably break things… so yeah, I decided to leave it as it is.
Overall the UI actually feels pretty good now. I’m honestly quite happy with how it turned out. However I still feel like the project might be a bit unstable in some situations, ughh… idk, but at this point I really don’t have time to keep polishing everything forever.
So yeah.
This is the final devlog. (for flavortown :P)

SO AFTER I WILL:

  • SHIPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP FINALLY
Attachment
0
artur33

Added/Fixed:

  • Message replies implemented with reply references
  • Message editing implemented with edit references
  • Delete system implemented (with delete flags instead of permanent removal)
  • Referenced messages now included when fetching messages so replies render as a quote on a header
  • Database updates for supporting all the stuff (editing, deleting, and retrieving messages, etc. etc.)
  • Live UI updates without requiring full message reloads [THIS WAS A PAIN, I ASKED AI YEAH, I WAS TIRED] -> There were always problems here: the users were seeing different chats, and a full chat update would look awful during chatting, so yeah, AI helped me alot for this one…
  • Composer (input) updated from single-line input to multi-line TextArea
  • Enter / Ctrl+Enter (because Ctrl+Shift wasn’t working in terminal) handling added for better message sending control
  • Reply/Edit preview UI added to the composer
  • Reply, edit, and delete action buttons added to messages on hover
  • Simple server info modal implemented
  • Channel creation restricted to server owners
  • Guard flag added to prevent overlapping message loads -> bug fixed
  • Some styling and UX changes for the TextArea, reply preview, and message action buttons, etc.
  • General improvements to message managment and minor fixes and bug fixes and oh my God, I want to sleeppp

Note: I’m tired. I’m tired I’m tired I’m tired. THIS IS THE LAST FUNCTIONALITY DEVLOG. I’m TIRED OF EVERYTHING. Too many problems. I JUST WANT TO FINISH ITTTTTTTT. This project has been such a pain. I also have school stuff to do and my eyes hurt and my head feels like it’s exploding.
About the devlog itself… well, everything just works (kinda…) and that’s it. uhhhhhhhhhhhhhhhhhhhhhhh, tomorrow I will do the README, will compile, and will see if everything works, I hope it does. I JUST DON’T HAVE TIME AT THIS POINT, AAAAAAAAAA… okay okay, It will be fine :/

Next:

  • BUG FIXING?
  • TESTING
  • SHIPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP FINALLY
0
artur33

Added/Fixed:

  • Presence system implemented (online/offline/invisible/do not disturb states)
  • Theme system implemented (+ light theme stylesheet added)
  • Database updated for supporting new stuff (presence and themes)
  • Avatar widget with colored presence indicator (the presence can be toggled by clicking directly on it)
  • Presence indicators now visible in members list, DM view and user profile
  • Presence automatically set to offline on logout/exit
  • Online friends view added in DM section
  • Periodic DM refresh added to update online friends and DM status
  • Minor stying updates and bigger light theme style update

Note: I originally thought the project was basically finished and that I would only do bug fixing, but while testing the app I realized that some important features are still missing, so I decided to implement a few more things before shipping.
I also implemented the light mode. For the styling I honestly used some AI help because writing the entire ā€˜light style’ manually would have taken quite a while, and at this point I’m trying to finish all this stuff.

Next:

  • Message delete and maybe edit
  • Server roles (at least the Owner who is the only one who can create channels)
  • More BUG FIXING?
  • TESTING
  • Other?
  • SHIPPPPPPPPPPPPPPPPPPPPP FINALLY
0
artur33

Added/Fixed:

  • Settings implemented with persistent user configuration (DM notifications, mention notifications, compact mode)
  • Database changes for storing and getting settings + password updates, user deletion and session cleanup
  • Settings modal implemented with tabs: Account, Notifications and Appearance
  • Account management features: username change, password change and account deletion
  • Compact mode rendering implemented for chat messages
  • Inline preview for image attachments from raw data
  • Periodic member list refresh added (5sec)
  • Styling updates and painful stuff
  • Various UI refinements, handling and bug fixes, like the 50mb attachment check before its loaded into RAM (that’s why everything was freezing before lol), and other fixes, yeah

Note: This update was mainly focused on getting the settings system working, and yeah, I know, there aren’t much settings, but I really don’t have much time at this point :(
I also spent some time improving attachments for image preview (looks very good, but I’m not sure if this will work on all the Terminal emulators… well, on Windows Terminal it works) and adding compact mode rendering so chats can be displayed in a more minimal layout.
At this point the project is very close to the end, so I think that I won’t add more big stuff, uhm, I guess

Next:

  • More BUG FIXING
  • TESTING
  • Other???
  • SHIPPPPP FINALLY
0
artur33

Added/Fixed:

  • Editable user profiles system implemented
  • Database expanded with new profile fields (pronouns, status, name_color, accent_color and connections JSON) + notes table and related db functions for notes and profile editing + some db queries updated to include name_color for message rendering
  • User profile UI expanded with pronouns, status, accent banner and connected accounts
  • Edit Profile modal implemented to customize profile information and appearance (shown name, pronouns, status, bio, username color, accent color (of the banner) and connected accounts)
  • Private user notes system implemented (notes stored per user and visible only to the note author)
  • User info panel update and now refresh after profile edits
  • Styling updates for profile panels, accent banners, edit profile screen, info panel, profile stuff ye, etc… [THIS WAS A PAINNN!!!!!]
  • New helpers in ā€˜utils.py’ for color managment
  • General UI improvements and a lot occured bugs fixed
  • It is still kinda unstable… ugh

Note: This was probably the most difficult devlog of all my flavourtown projects. I spent more than 8 hours working on all this stuff, ohh my gosh… At first I actually started implementing profiles in a completely different way, but after about an hour I decided to scrap that approach and rewrite using the current structure yeah
Even now it still feels a bit unstable, but I tried my best to make it work within the time I have left. A lot of the difficulty came from the constant problems/bugs, UI updates (STYLING), and profile editing all together without breaking everything
Only 5 days left now… I’m honestly not sure how much more I will be able to implement, my plan now is probably to add some very minimal settings, then focus on fixing bugs and reviewing everything to make sure the application is at least stable enough, and then compile… aaaaaaah, wish me luckk

Next:

  • Fast Settings
  • BUG FIXING
  • TESTING
  • Other?
  • SHIP FINALLY
0
artur33

Added/Fixed:

  • Search system implemented for messages and members across channels and direct messages
  • Database search funcs added for search system
  • UI styles added for search results and some members collumn modifications
  • Minor stuff related to search

Note: For this update I decided to just focus on finishing the search functionality. I thought about implementing a live updating search (results updating while typing), but in the end I decided to do that later, right now I need to move on to the next features because time is starting to get tight

Next:

  • Profile customization
  • Settings
  • Other
Attachment
Attachment
Attachment
0
artur33

Added/Fixed:

  • Unread tracking system implemented (for channels/servers and DMs)
  • Notifications system implemented (for DMs and Mentions)
  • Database backend modified for unread messages across servers/channels and direct messages
  • Conversations are automatically marked as read when opened to keep unread state consistent ofc [spent some time to get this to work]
  • Mentions system implemented (detection and highlight in messages + notification)
  • Background polling for notifications and new polling for unreads
  • Displayname/username resolution dedicated func in ā€˜utils.py’
  • Message refresh interval lowered to make updates feel more responsive (all set to 1)
  • Styling updates for unread stuff
  • Initial styling added for the search input (search feature still WIP)

Note: This time I actually wanted to devlog earlier: I had already started working on the search functionality, but then I stopped and decided it was better to devlog the notifications and mentions system first before continuing :p

Next:

  • Search
  • Profile customization
  • Settings
  • Other
0
artur33

Added/Fixed:

  • Direct Messages system implemented (actual chat between friends) (DM storage inside the database)
  • ā€˜Open a DM’ flow added for chatting with friends
  • DM user panel implemented (same info as the profile modal) (members panel integration updated to support it)
  • Profile modal changed (same info as the DM user panel)
  • Day separators added to visually separate conversations by date
  • Compact message grouping implemented (consecutive messages from the same sender within a short time are visually grouped together like the real Discord or other services)
  • Message attachments can be discarded
  • Friend removal func
  • Pending request check in database
  • Styling updates for day separators, compact message groups, DM panels, profile modals, etc.
  • Minor UI improvements

Note: I’m tired :(

Next:

  • Mentions
  • Search
  • Profile customization
  • Maybe some kind of notifications
  • Settings
  • Other
Attachment
Attachment
0
artur33

Added/Fixed:

  • Friends system implemented (friend requests + friend list)
  • Friend request flow implemented (send, accept/decline requests)
  • Database backend modified for managing friendships and pending requests
  • Direct Message UI implemented (Inbox section, idk how should I call it, I just called it ā€œdmā€ and the other ones are ā€œserverā€
  • DM navbar with views for friends and pending requests
  • Friend cards and request cards added for viewing friends
  • User profile modal for viewing user info when clicking on a user in the members list
  • ā€˜Add friend’ modal to add a friend by knowing the username
  • UI/UX improvements
  • All screens converted to modal screens
  • Logout button added near the current username
  • Attachment size limit set to 50MB max
  • Styles added for DM interface components
  • General UI style changes for better usability

Note: This update took some time againnnn because there were a LOT of bugs. The DM views especially were completely broken at first, the navigation didn’t work correctly, elements were appearing in the wrong places, and overall the UI logic was kind of a mess… CSS was also a pain again (as usual). Even small visual adjustments sometimes required a lot of trial and error to make things look acceptable.
Because of some IRL stuff I probably won’t have enough time to implement a huge amount of additional functionality before the end of FT, ugh, we will see :(

Next:

  • Direct Messages (actual chat between friends)
  • Mentions
  • Search
  • Profiles
  • Maybe some kind of notifications
  • Settings
  • Other
0
artur33

Added/Fixed:

  • Message sending implemented for server channels
  • Attachment system implemented (persistence, meaning that binary data + filename are stored in the database)
  • Attachment UIs implemented + ā€˜attach button’ added to the message input ā€œboxā€
  • Live message updates implemented (polling each 5 seconds, only the new messages instead of reloading everything (for optimization))
  • Styling for messages and attachments
  • Fixes for UI issues (screen callbacks[/previus devlog problem]) and other minor stuff

Note: Once again this update took quite a bit of time to figure out the way to implement things. There was an especially annoying bug when fetching messages (the polling auto-fetch) from the database: the order was completely wrong… Then there were a LOT of CSS problems again, uhm, small UI changes can take way longer than expected, ye :(
It feels like implementing even a single feature takes a lot of time in this project, but it’s starting to look decently (at least for my eyes lol :/ )
Next big step will probably be user and friends management and then DMs… which I already feel like will be quite painful to implement, aaah

Next:

  • User popups (like all the id thing? or the nicknames? idk)
  • Friends + Direct Messages
  • Mentions
  • Profiles
  • Settings
  • Other stufffffff
0
artur33

Added/Fixed:

  • Server (multi server (create and join servers using invite codes)) and channel system implemented
  • Database expanded to support servers, channels, members and messages (messages still WIP) stuff + helpers
  • UI screens to: create new servers, join servers via invite code, create channels inside servers, show invite codes, and the main UI ye…
  • Styling added for new UI components [styling is so baka… I used AI to fix some problems, uh :/]

Note: This devlog took a bit longer than expected because I couldn’t get a version of the project that felt stable enough to commit. Even though it might look like not that much was added, a lot of time was spent figuring out how to properly structure things with Textual and how to make the UI work. Textual is uhm, idk, is difficulttt, hm. I also know I probably should devlog more often instead of waiting for a bigger update, but I don’t really like committing half-broken features… which is kinda funny because that’s basically what I’m doing now anyway because there is currently a known issue: after creating a server or a channel the UI does not update automatically yet… For now: when creating a new server the application needs to be restarted and when creating a channel you need to click the server button again to refresh the channel list. So yeah… that still needs to be fixed. My God I’m exhausted, need to sleep now…

Next:

  • Fix problems
  • Sending messages in servers
  • User popups
  • Friends + Direct Messages
  • Mentions
  • Profiles
  • Settings
  • Other stufffffff
0
artur33

Note: New projecttttt: a Discord-like messaging application that runs in the terminal using the Python framework Textual. For this project I initially planned to build everything completely from zero, but I decided to reuse the authentication logic from one of my previous projects since it was already good ig. It saved quite a bit of time and let me focus more on the UI side of the application. Also Textual is actually really interesting to work with it feels surprisingly powerful that I can do TUI stuff this fast.

Added:

  • Created the main app class and screen system + project structure (main.py, screens.py, style.tcss, db.py, auth.py and utils.py)
  • Implemented screen routing with ā€œloginā€ and ā€œmainā€ screens
  • Login and Register UI
  • Authentication system (reused the auth logic from one of my previous projects instead of rewriting everything from scratch)
  • Database system (SQLite3) -> Still everything WIP
  • Initial Discord-like layout (servers, channels and members columns, user info, chat area and input for the message) -> nothing really works, still WIP

Next:

  • Servers (creation)
  • Channels
  • Sending messages in servers
  • Members list (and user popups)
  • Friends + Direct Messages
  • Mentions
  • Profiles
  • Settings
  • Other stuffff, idkkk
0