term-chat is a simple command-line chat ๐ฌ application written in Python๐. It allows users to communicate with each other through a terminal interface.
You can read my hashnode article here to get an overview of the project: TERM-CHAT: A simple command-line chat application
It's a Typer application, so you can use the --help
flag to get a list of all the available commands.
In development mode, you can run the application using python -m term_chat
.
-
Auth commands
auth create-user
: Register a new userauth login
: Login as an existing user (creates a pickle file in the current directory)auth logout
: Logout the current userauth whoami
: Display the current userauth delete-user
: Delete the current logged-in user from the database
-
Room commands
room create
: Create a new chat roomroom join
: Join an existing chat roomroom leave
: Leave a room that you have joinedroom info
: Get information about a chat roomroom list-all
: List all the chat rooms made by youroom delete
: Delete a chat room that you have created
-
Chat commands
chat start
: Send a message to a chat room
- Real-time chat: Users can send and receive messages in real-time.
- Multiple chat rooms: Users can join different chat rooms and interact with other users in each room.
- Simple and intuitive interface: The chat interface is designed to be user-friendly and easy to navigate.
- Python 3.8 or higher
- Poetry
-
Clone the repository:
git clone https://github.com/Ananya2001-an/term-chat.git cd term-chat
-
Activate the virtual environment(optional but recommended):
python -m venv venv venv/Scripts/activate
-
Install the dependencies:
poetry install
-
Create dotenv file and add necessary environment variables for the database connection:
cp .env.example .env
-
Run the tests to make sure everything is working as expected:
poetry run pytest -v
-
Run the application:
python -m term_chat --help