A terminal-based messaging application built with Python. This project simulates core Discord-like features such as authentication, direct messaging, and temporary encrypted chats within a command-line interface.
This project was developed as a learning exercise to explore:
- JSON-based data storage
- Python file handling
- Multi-threading for real-time updates
- Modular project architecture
- CLI application design
- User authentication (login and registration)
- Command-line interface (Linux-style commands)
- Direct messaging (DM system)
- Temporary encrypted chat (E2E-style messaging)
- JSON-based message storage
- Event logging system
- Real-time message updates using threading
- Clean and modular code structure
▸ Real-time messaging without a network layer — solved using Python threading to poll JSON files for new messages, simulating live chat in a single-machine environment
▸ Session isolation for E2E chats — implemented temporary chat files that are cleared on session end, preventing message persistence between private sessions
▸ Modular CLI design — separated concerns across 8 modules (auth, client, server, commands, logger) to mirror how real chat backends are structured
- Python
- JSON (data storage)
- Threading (real-time updates)
- File system management
- CLI-based interface
-
Clone the repository:
git clone https://github.com/Dhruv-Cmds/Cli-discord.git
-
Navigate into the project directory:
cd Cli-discord- Run the program: python main.py
Discord-Simulator/
│
├── authenticationdata/
│ └── userdata.json
│
├── Discord/
│ ├── authentication.py
│ ├── client.py
│ ├── cmds.py
│ ├── dc.py
│ ├── dcpannel.py
│ ├── logger.py
│ ├── main.py
│ └── server.py
│
├── DM/
│ └── (stored DM conversations).json
│
├── Logs/
│ └── logs.json
│
├── Pvtchat/
│ └── (temporary encrypted chats).json
│
├── screenshots/
│ └── Screenshots
│
├── .gitattributes
├── .gitignore
├── LICENSE
└── README.md
- The application starts with a boot menu.
- Users can register or log in.
- After authentication, the command panel is displayed.
- Users interact using CLI commands.
- Messages are stored in JSON files within the DM directory.
- Threading enables real-time message updates.
help Show all available commands
dm <user> Start a direct message with a user
e2e_chat Start a temporary encrypted chat
clear Clear the terminal
exit Close the application
DS> dm Alex
Press '/e' to leave the chat.
msg > hello
msg > how are you
msg > /e
This project is licensed under the MIT License.
Dhruv